Category: C#
-
How to prevent double clicking or multiple Form submission after the ASP.Net Button is clicked?
Below picture shows the typical flow when an ASP.Net Web Form is submitted by the user. You want to prevent double clicking or submitting the form multiple times after the ASP.Net Button is clicked so that same data should not be stored more than once. We want to prevent multiple form submission at step 1…
-
How to set the value of asp:HiddenField using jQuery and get the value at ASP.Net code behind
If you come to this page looking out for a quick answer for “How to set the value of asp:HiddenField using jQuery and get it in code behind”, here is the answer. But I recommend you to read through the rest of the article to know why we are doing what we are doing. Aspx…
-
Calling Javascript from Code Behind in ASP.Net using C# – How it works
There are times when you want to call a javascript function from code behind based on business logic in your ASP.Net applications. This could be because that your business logic needs to talk to database to decide whether javascript function has to be called or not. When you do a simple Google search for this…
-
Beginner’s Guide to Value and Reference Types in C#
Value Type: Built in types such as int(all numeric types),char,bool etc.. would come under value type. Custom struct and enum would also fall into this category. Value types exhibit following characteristics. Actual Value(s) gets copied when a variable is assigned to another variable and there is no relationship between two variables after the assignment statement…
-
Adding methods to existing classes in C#
There are many times when we might want to add functionality to existing code. The existing code could be the classes written by fellow developers in our team or it could be third party code that we might want to use. The obvious choice is to create a new class by inheriting the existing class…