asp.net
Related to asp.net
Lets quickly have a look at how you can limit the entry to textbox and display the character input left to be keyed in. First things first, the script. <script type="text/javascript"> $(function() { var limit = 250; $('#dvLimit').text('250 characters left'); $('textarea[id$=txtDemoLimi... { var len = $(this).val().length; if (len > limit) { this.value = this.value.substring(0, limit); } $("#dvLimit").text(limit - len + " characters left"); }); }); </script> The $()...
c# 3.0 : Partial Method You are all aware of “Partial Class” introduced in .net 2.0. Partial class is useful in situation where you need to split the definition of a class, struct or an interface over two or more source files. Each source file contains a section of the type or method definition and all parts are combined when the application is compiled. There are several situations when splitting a class definition is desirable: When working on large projects, spreading a class over separate files...
Let's try a simple in-place edit with jquery. For demonstration purpose I am using the plain old HTML file. However, if you, wish you could apply the same technique to asp.net, asp.net mvc or php or any other web application as well. Here is the html that we will be using for the demo. <body> <div style="line-height:3xm;back... Double Click the below paragraph to edit. </div> </br></br> <div class="edit"> Lorem ipsum dolor sit amet, consectetur...
This typical problem is almost faced by all new developer working with asp.net. This behaviour is by design as ASP.NET tries to be efficient in storing sessions for users. Remember unless you store anything in session the session id value keep changing. If you want to tell ASP.NET that you want it to track user sessions, you can do one of 2 things: Store something in the session. Simple handle the Session_Start event in your GLobal.asax. The presence of this method will tell ASP.NET to track sessions...