There is a strange issue with VB.NET/VS 2003. The Page.RegisterClientScriptBlock method is not visible through intellisense. It was very weird as the same method was visible in a C# project. Finally Googling on this issue I found out that by default VB.NET projects need to be configured to show "Advanced Members". To set the same, go to: Tools->Options->Text Editor->Basic->Ge...
We have been using Visual Source Safe 2005 (using SCC Switcher plugin) so that it works over internet. I heard that VSS has issues when project size is large numbers of users more. But with our team of 7 programmers for one not-very-large project, we faced many issues, like files getting corrupted, missed check ins, and file management issues. So i decided to go back to good old SourceJa...
Suddenly for some unknown reasons I started seeing this error while accessing a particular project using SourceJammer(SJ) client (ver 2.1.0.0). Googling around I found this post by the creator of SJ where he says that in order to remove this error, we need to increase the timeout value in serverconfig.xml from default 1000 to 4000 and restart SJ (which means restart the TomCat service). ...
There are different approaches to this, but mostly I have seen the following being used often: 1. Using a contentplaceholder control in the HEAD element (see this article for details): http://odetocode.com/Blogs/scott/archive/2006/04/10/3258.aspx 2. Using a BasePage approach, refer this article: www.codeproject.com/aspnet/ Page Tags .asp I really find the second method (using a BasePage ...
Many people initially get confused with the real need for delegates and events. I was one of them and it took me some time to figure it out :-). Recently answered a similar query in ASP.NET forums and thought it would be good if I create a blog post on this topic! Here was the query: "I was reading an example somewhere of a Bank Class that if the minimum balance is reached you need to in...
A junior developer in our recent project got stuck in this issue: he had to call Javascript code from VB.NET code behind and insert this value in a function: Jammin' Hard. Now the single quote (apostrophe ') was creating trouble, giving an error as JS string got terminated. A simple solution in such cases is to use HTML codes for apostrophe, which is : ' So the string should be ...
We can localize Javascript pop up texts using server side variables in client side. In page class we will declare a protected variable: public partial class _Default : BasePage { protected string jsPopUpText; protected void Page_Load(object sender, EventArgs e) { jsPopUpText= Resources.TestSiteResources.jsPopUp; } Then we will use this value in the client side JS code as: <script lang...
This is a very common problem: a developer makes some GUI related changes, like modifying colors in stylesheets or uploading modified images, and then uploads changes to the remote web server (which can be for testing or even a live production server). But he/she is not able to view the changes, the web server shows old cached content! Welcome to IIS Caching! IIS (and other web servers) ...
Just a small catch: My friend was using formsauthentication and for some weird reason he was not able to redirect to the requested page even after successful login. It was a simple mistake in his code: if you have FormsAuthentication enabled and creating a persistent cookie based on Remember Me check box selection, you need to make sure that for the other case, where the user does not se...
I was explaining Forms authentication in the ASP.NET forums and thought of writing about it (very basic stuff). See the below sample entry in the config file: <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="/private/login.aspx" protection ="All" timeout="20" path="/" slidingExpiration="true"> forms > <authorization> <deny users="?" /> authorizat...
I am working on a full fledged product comprising many modules to automate a wide array of human resources management related activities. Since we are developing a commercial product, we have to be very cautious in its initial architecture and design. Though we focused primarily on meeting different and complex business requirements but enough consideration was given using latest technol...
I have become a STAR contributor in the ASP.NET forums ! Its been great trying to help out in one of the busiest forums on web development. Its a great way to move ahead on the path of self learning and share ideas with developers across the world.
The type or namespace name 'Configuration' does not exist in the namespace 'System.Web' This error will crop up if you try to use Configuration namespace in VS 2005 in the same way we used to access configuration namespace in VS 2003. In .NET 2.0, the ConfigurationManager class is the new mechanism to handle configuration information instead of ConfigurationSettings class in 1.x. This na...
There are already many posts on this hotly debated topic on Tables vs CSS-P (Div tags). Some good links are: http://www.hotdesign.com/seybold/index.html http://www.decloak.com/Dev/CSSTables/CSS_Tables_01.aspx Both posts are very contrasting and both strongly present pros/cons of using tables vs DIVs. But in my opinion, working with DIVs is kinda cool but there is a learning curve, wherea...
I was answering a query related to FormsAuthentication in ASP.NET 2.0 and got to know that the persistent cookies behavior has been changed in 2.0, means that they take the " timeout " value from the web.config file (even if we manually set the cookies expiry time). The documentation in MSDN( http://msdn2.microsoft.com/en-us/library/1d3t3c61.aspx ) is also incorrect in my opinion, which ...
I have found using a Base Page class in my web projects immensely useful. What exactly is a Base Page class? We know that all our web page code behinds derive from System.Web.UI.Page class as: public partial class Default4 : System.Web.UI. Page { ...} Now, many times we need to code the same thing in every page class, for example consider these scenarios: 1. Setting the culture of the cu...
Can we run both 1.1 and 2.0 web projects on the same Windows 2003 server? Many times I have answered this question on the forums , so thought of writing a post on the same. IIS 6.0 can run both ASP.NET 1.1 and 2.0 web applications simultaneously on the same server, if each version specific application is assigned a different application pool. Now what is an application pool? We know that...
Many times we would like to export our page as an Excel sheet, Word doc or PDF file. This can be simply achieved by changing the ContentType of the Response object and overriding the RenderControl method of the control to be exported: Page Load() { //bind data to data bound controls and do other stuff Response.Clear(); //this clears the Response of any headers or previous output Response...
I came across this interesting post on how to extend the Page directives in ASP.NET 2.0 by Scott and though of sharing it. See the link for details: http://weblogs.asp.net/scottgu/archive/2005/08/02/421405.aspx
Yesterday while browsing I came across an interesting article which talks about the death of J2EE in a pure SOA world. See this link for the complete article: http://searchwebservices.techtarget.com/originalContent/0,289142,sid26_gci1198211,00.html It basically says that: 1. J2EE will go the CORBA way but JAVA language will not be affected in any way 2. J2EE is well suited for platform i...
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address:
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18