This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How To Convert User Input In Dmy Format To Mdy? |
|
Answer» VB.NET C# VB.NET C# |
|
| 2. |
How To Get The Url Of Page Dynamically? |
|
Answer» Use Request.Url property. |
|
| 3. |
Are Namespaces And Class Names Are Case Sensitive? |
|
Answer» Namespaces and Class NAMES are case Sensitive. Namespaces IMPORTED using the @ Import DIRECTIVE will cause an error if the CORRECT case is not USED. Namespaces and Class names are case Sensitive. Namespaces imported using the @ Import Directive will cause an error if the correct case is not used. |
|
| 4. |
How To Validate That A String Is A Valid Date? |
|
Answer» VB.NET C# VB.NET C# |
|
| 5. |
Why Do I Get The Error Message "system.invalidoperationexception: It Is Invalid To Show A Modal Dialog Or Form When The Application Is Not Running In Userinteractive Mode. Specify The Servicenotification Or Defaultdesktoponly Style To Display A ...."? |
|
Answer» You can't use MSGBOX or MessageBox.Show in ASP.NET WebForm. You maybe use: C# You can't use MsgBox or MessageBox.Show in ASP.NET WebForm. You maybe use: C# |
|
| 6. |
How Can I Ensure That Application-level Variables Are Not Updated By More Than One User Simultaneously? |
|
Answer» USE the HttpApplicationState's LOCK and UNLOCK METHODS. Use the HttpApplicationState's Lock and UnLock methods. |
|
| 7. |
How To Convert A String To Proper Case? |
|
Answer» USE the NAMESPACE System.Globalization.VB.NET C# Use the namespace System.Globalization.VB.NET C# |
|
| 8. |
How To Include Multiple Vb/cs Files In The Source? |
|
Answer» You can do this using assembly directives. However, note that each source FILE will be compiled individually into its own assembly, so they cannot have DEPENDENCIES on each other. You can do this using assembly directives. However, note that each source file will be compiled individually into its own assembly, so they cannot have dependencies on each other. |
|
| 9. |
How To Convert Milliseconds Into Time? |
|
Answer» VB.NET C# VB.NET C# |
|
| 10. |
What Is The Difference Between Url And Uri? |
|
Answer» A URL is the address of some resource on the WEB, which means that normally you type the address into a browser and you get something back. There are other type of resources than Web pages, but that's the easiest conceptually. The browser goes out somewhere on the Internet and ACCESSES something. A URI is just a unique string that uniquely identifies something, commonly a namespace. Sometimes they look like a URL that you COULD type into the address bar of your Web browser, but it doesn't have to POINT to any physical resource on the Web. It is just a unique set of CHARACTERS, that, in fact, don't even have to be unique. URI is the more generic term, and a URL is a particular type of URI in that a URL has to uniquely identify some resource on the Web. A URL is the address of some resource on the Web, which means that normally you type the address into a browser and you get something back. There are other type of resources than Web pages, but that's the easiest conceptually. The browser goes out somewhere on the Internet and accesses something. A URI is just a unique string that uniquely identifies something, commonly a namespace. Sometimes they look like a URL that you could type into the address bar of your Web browser, but it doesn't have to point to any physical resource on the Web. It is just a unique set of characters, that, in fact, don't even have to be unique. URI is the more generic term, and a URL is a particular type of URI in that a URL has to uniquely identify some resource on the Web. |
|
| 11. |
What Is The Difference Between Absolute Vs Relative Urls? |
|
Answer» Absolute /Fully Qualified URLs:
Absolute /Fully Qualified URLs: |
|
| 12. |
What Is Xxx(src As Object, E As Eventargs)? |
|
Answer» XXX is an event HANDLER src is the object that fires the event e is an event argument object that contains more information about the event An event handler is USED when one object wants to be NOTIFIED when an event happens in another object. xxx is an event handler src is the object that fires the event e is an event argument object that contains more information about the event An event handler is used when one object wants to be notified when an event happens in another object. |
|
| 13. |
Can I Read The Hard Disk Serial # Of The Client Computer Using Asp.net? |
|
Answer» No. Such INFORMATION is not PASSED to the SERVER with a HTTP REQUEST. No. Such information is not passed to the server with a http request. |
|
| 14. |
What Is The Difference Between Currentculture Property And The Currentuiculture Property? |
Answer»
|
|
| 15. |
How To Detect The User's Culture? |
|
Answer» VB.NET C# VB.NET C# |
|
| 16. |
Why Do I Get A Blank Page When I Use Server.transfer("page1.htm") To Transfer To A Different Page? |
|
Answer» Server.Transfer only WORKS with .ASPX pages You can't use Transfer METHOD with HTML pages. Server.Transfer only works with .aspx pages You can't use Transfer method with HTML pages. |
|
| 17. |
How Can I Logout When Using Formsauthentication? |
|
Answer» FormsAuthentication.SignOut(). FormsAuthentication.SignOut(). |
|
| 18. |
How Can I Save Images ? |
|
Answer» You NEED a stream to READ the RESPONSE, WebResponse. GetResponse Stream(), and a stream to WRITE it to the HARD drive. FileStream should do the trick. You'll have to write to the filestream what you read from the response stream. You need a stream to read the response, WebResponse. GetResponse Stream(), and a stream to write it to the hard drive. FileStream should do the trick. You'll have to write to the filestream what you read from the response stream. |
|
| 19. |
My Asp Code Gives An Error "compiler Error Message: Bc30289: Statement Cannot Appear Within A Method Body. End Of Method Assumed" When Changed To .aspx? |
|
Answer» USE a <script runat="server" type="text/javascript"> BLOCK INSTEAD of the <% %> syntax to DEFINE Subs.Make sure you have proper events associated with the code and have start and end of PROCEDURE or function wirtten properly. Use a <script runat="server" type="text/javascript"> block instead of the <% %> syntax to define Subs.Make sure you have proper events associated with the code and have start and end of procedure or function wirtten properly. |
|
| 20. |
How To Grab The Referring Url? |
|
Answer» VB.NET C# VB.NET C# |
|
| 21. |
Do I Have To Compile Code If I Am Changing The Content Of My Aspx.cs File? |
|
Answer» YES if you have USED Codebehind="my.aspx.cs". if not you used SRC="my.aspx.cs" in your PAGE DECLARATION. Yes if you have used Codebehind="my.aspx.cs". if not you used src="my.aspx.cs" in your page declaration. |
|
| 22. |
What Is The Best Way To Output Only Time And Not Date? |
|
Answer» USE DATETIME as follows VB.NET C# Use DateTime as follows VB.NET C# |
|
| 23. |
How To Get Url Without Querystring? |
|
Answer» VB.NET C# VB.NET C# |
|
| 24. |
Why Do I Get Error Message "error Creating Assembly Manifest: Error Reading Key File 'key.snk' -- The System Cannot Find The File Specified"? |
|
Answer» CHECK the location of the key.snk FILE relative to the assembly file. Provide an explicit path or a relative path. Check the location of the key.snk file relative to the assembly file. Provide an explicit path or a relative path. |
|
| 25. |
Asp Pages That Worked Pefectly On Windows 2000 Server And Iis 5.0 Do Not Work On Windows 2003 Server With Iis 6.0. Asp.net Pages Work Fine. Why? |
|
Answer» Start -> SETTINGS -> Control PANEL -> Administrative Tools -> and double clicking IIS MANAGER. Start -> Settings -> Control Panel -> Administrative Tools -> and double clicking IIS Manager. |
|
| 26. |
Why Can't I Put <%@ Page Language="c " %> Where At The Top Of An Aspx File And Write My Server-side Scripts In C ? |
|
Answer» The PARSERS ASP.NET uses to extract code from ASPX files UNDERSTAND C#, Visual Basic.NET, and JScript.NET. You can WRITE server-side scripts in any LANGUAGE supported by a .NET COMPILER. The parsers ASP.NET uses to extract code from ASPX files understand C#, Visual Basic.NET, and JScript.NET. You can write server-side scripts in any language supported by a .NET compiler. |
|
| 27. |
Can I Recieve Both Html Markup For Page And Code In The Asp.net Web Page's Source Code Portion In The Web Browser? |
|
Answer» No. The Web browser RECIEVES only HTML MARKUP,No source code or web control SYNTAX is PASSED back to the web browser. No. The Web browser recieves only HTML markup,No source code or web control syntax is passed back to the web browser. |
|
| 28. |
Is It Possible To Use A Style Sheet Class Directly On A Control Instead Of Using Inline Or Page-level Formatting ? |
|
Answer» Every WebControl derived CONTROL has a CssClass property which ALLOWS you to SET it's format to a style SHEET. Every WebControl derived control has a CssClass property which allows you to set it's format to a style sheet. |
|
| 29. |
What Is A .resx File? |
|
Answer» The .resx RESOURCE file format consists of XML entries, which specify OBJECTS and strings INSIDE XML tags. This is useful for LOCALIZATION. The .resx resource file format consists of XML entries, which specify objects and strings inside XML tags. This is useful for localization. |
|
| 30. |
I Have Created A .net User Control Page (.ascx) But I Cannot Compile And Run It. |
|
Answer» User control (ASCX) can't be RUN on it own, but you can drag it ONTO any WEB page (aspx) and then run it. User control (ascx) can't be run on it own, but you can drag it onto any web page (aspx) and then run it. |
|
| 31. |
How Can I Get The Value Of Input Box With Type Hidden In Code-behind? |
|
Answer» You can SET the runat= server for the HIDDEN control and you can use ControlName.VALUE to GET its value in CodeBehind file. You can set the runat= server for the hidden control and you can use ControlName.Value to get its value in CodeBehind file. |
|
| 32. |
What Is The Difference Between Src And Code-behind? |
|
Answer» Src attribute means you deploy the source CODE files and everything is COMPILED JIT (just-in-time) as needed. Many people prefer this since they don't have to manually worry about compiling and messing with dlls -- it just works. Of course, the source is now on the SERVER, for anyone with access to the server -- but not just anyone on the web. CodeBehind attribute doesn't really "do" anything, its just a helper for VS.NET to associate the code FILE with the aspx file. This is necessary since VS.NET automates the pre-compiling that is harder by hand, and therefore the Src attribute is also gone. Now there is only a dll to deploy, no source, so it is certainly BETTER protected, although its always decompilable even then. Src attribute means you deploy the source code files and everything is compiled JIT (just-in-time) as needed. Many people prefer this since they don't have to manually worry about compiling and messing with dlls -- it just works. Of course, the source is now on the server, for anyone with access to the server -- but not just anyone on the web. CodeBehind attribute doesn't really "do" anything, its just a helper for VS.NET to associate the code file with the aspx file. This is necessary since VS.NET automates the pre-compiling that is harder by hand, and therefore the Src attribute is also gone. Now there is only a dll to deploy, no source, so it is certainly better protected, although its always decompilable even then. |
|
| 33. |
Can I Combine Classic Asp And Asp.net Pages? |
|
Answer» No. ASP pages can run in the same site as ASP.NET pages, but you can't MIX in a PAGE. ALSO ASP and ASP.NET won't share their session. No. ASP pages can run in the same site as ASP.NET pages, but you can't mix in a page. Also ASP and ASP.NET won't share their session. |
|
| 34. |
Will The Webmatrix Sqldatasourcecontrol Work With A Mysql Connection? |
|
Answer» SqlDataSourceControl LETS you connect and work with MS SQL DB, while AccessDataSourceControl do the same thing but for MS Access DB. Therefore SqlDataSourceControl can't help you in your MySql CONNECTIVITY . SqlDataSourceControl lets you connect and work with MS SQL DB, while AccessDataSourceControl do the same thing but for MS Access DB. Therefore SqlDataSourceControl can't help you in your MySql connectivity . |
|
| 35. |
Why Do I Get Error Message "could Not Load Type" Whenever I Browse To My Asp.net Web Site? |
|
Answer» Your code-behind FILES for either your .aspx or the global.aspx page have not been COMPLIED. USE Visual Studio .NET's "Build | Build Solution" menu, or run the command LINE compiler. Your code-behind files for either your .aspx or the global.aspx page have not been complied. Use Visual Studio .NET's "Build | Build Solution" menu, or run the command line compiler. |
|
| 36. |
How Do I Publish My Asp.net Application To My Isp's Web Server? |
|
Answer» Your ISP must first create an IIS APPLICATION and apply the Front Page Server EXTENSIONS to it. Then in Visual Studio.NET, SELECT the "Project | Copy Project" menu. Then enter the URL and select the FrontPage web access METHOD. The "Copy Project" feature copies all of the NECESSARY files to your ISP's machine for your ASP.NET application to run. You can also FTP your files to your ISP web server. But you must know which files to upload. Your ISP must first create an IIS application and apply the Front Page Server Extensions to it. Then in Visual Studio.NET, select the "Project | Copy Project" menu. Then enter the URL and select the FrontPage web access method. The "Copy Project" feature copies all of the necessary files to your ISP's machine for your ASP.NET application to run. You can also FTP your files to your ISP web server. But you must know which files to upload. |
|
| 37. |
Are There Resources Online With Tips On Asp To Asp.net Conversions? |
|
Answer» Microsoft has deisnged The ASP to ASP.NET MIGRATION Assistant help us convert ASP pages and applications to ASP.NET. It does not make the conversion PROCESS completely automatic, but it will SPEED up project by automating some of the steps required for migration. The FOLLOWING Code Migration Assistants are discussed in the link below. Microsoft has deisnged The ASP to ASP.NET Migration Assistant help us convert ASP pages and applications to ASP.NET. It does not make the conversion process completely automatic, but it will speed up project by automating some of the steps required for migration. The following Code Migration Assistants are discussed in the link below. |
|
| 38. |
How Should I Destroy My Objects In Asp.net? |
|
Answer» ASP.Net actually has very solid INTERNAL GARBAGE collection. So this is not an issue as it was in PREVIOUS versions of Active SERVER Pages. ASP.Net actually has very solid internal garbage collection. So this is not an issue as it was in previous versions of Active Server Pages. |
|
| 39. |
Does Asp.net Still Recognize The Global.asa File? |
|
Answer» ASP.Net does not recognize the STANDARD ASP global.asa file. Instead it USES a file named global.asax with the same - PLUS additional - functionality. ASP.Net does not recognize the standard ASP global.asa file. Instead it uses a file named global.asax with the same - plus additional - functionality. |
|
| 40. |
Where Can I Get Information On Cookies In Asp.net? |
|
Answer» Refer MIKE Pope's ARTICLE Basics of COOKIES in ASP.NET. Refer Mike Pope's article Basics of Cookies in ASP.NET. |
|
| 41. |
How To Work With Timespan Class? |
|
Answer» VB.NET C# VB.NET C# |
|
| 42. |
Is There Any Control That Allows User To Select A Time From A Clock - In Other Words Is There A Clock Control? |
|
Answer» Peter BLUM has developed some CONTROLS. CHECK out Peter's Date PACKAGE: TimeOfDayTextBox and Duration Text Box Controls. Peter Blum has developed some controls. Check out Peter's Date Package: TimeOfDayTextBox and Duration Text Box Controls. |
|
| 43. |
How Can I Change The Action Of A Form Through Code? |
|
Answer» You cannot change it. The ACTION attribute is owned by ASP.NET. HANDLE EVENTS and Transfer. You cannot change it. The action attribute is owned by ASP.NET. Handle Events and Transfer. |
|
| 44. |
What Are The Differences Between Html Versus Server Control? |
|
Answer» REFER Refer |
|
| 45. |
Is There A Method Similar To Response.redirect That Will Send Variables To The Destination Page Other Than Using A Query String Or The Post Method? |
|
Answer» Server.Transfer preserves the current page context, so that in the TARGET page you can extract values and such. However, it can have side effects; because Server.Transfer doesnt' go through the browser, the browser doesn't update its history and if the user clicks Back, they go to the page previous to the source page. Server.Transfer preserves the current page context, so that in the target page you can extract values and such. However, it can have side effects; because Server.Transfer doesnt' go through the browser, the browser doesn't update its history and if the user clicks Back, they go to the page previous to the source page. |
|
| 46. |
How To Implement Form Based Authentication In Asp.net Application? |
|
Answer» For For |
|
| 47. |
How To Display A Wait Page While A Query Is Running? |
|
Answer» REFER ASYNCHRONOUS WAIT STATE PATTERN in ASP.NET. Refer Asynchronous Wait State Pattern in ASP.NET. |
|
| 48. |
How To Access The Parameters Passed In Via The Url? |
|
Answer» Call the Request.QueryStringmethod passing in the KEY. The method will return the parameter value associated with that key. VB.NET C# Call the Request.QueryStringmethod passing in the key. The method will return the parameter value associated with that key. VB.NET C# |
|
| 49. |
How To Get The Ip Address Of The Host Accessing My Site? |
|
Answer» VB.NET C# VB.NET C# |
|