Can I use a src attribute with a Web Service

The .aspx pages are the only ones that support the Src attribute, and therefore it’s the only file type that supports JIT compilation of separate source files.By using the Src attribute in the page directive, you can specify which file the ASP.NET engine should compile. It cannot be used with a WebService. This means that you must precompile the code behind class that is to be used as the basis for the Web Service, either manually using the Command-line compiler or by building a Visual Studio.NET Web Service Application.

I get the error System.__ComObject when using recordset

This error occurs if you are trying to fetch the recordset value as follows rs.Fields(‘productname’) To avoid this error try VB.NET rs.Fields(‘productname’).Value.ToString() C# rs.Fields[‘productname’).Value.ToString() ;

How to get the currently logged in user

To get the user ID of the user who is currently logged in, you would get it using this: System.Web.HttpContext.Current.User.Identity.Name VB.NET ’Displays the currently logged in user Response.Write(User.Identity.Name.ToString()) C# //Displays the currently logged in user Response.Write(User.Identity.Name.ToString());

How to detect the User’s culture

VB.NET Dim sLang As String sLang = Request.UserLanguages(0) Response.Write(sLang) C# string sLang ; sLang = Request.UserLanguages[0]; Response.Write (sLang);