Skip to main content

Posts

ASP.NET QueryString

You want to see how to use the  QueryString  collection in the ASP.NET web development framework. Almost all examples show one way of using this NameValueCollection, but there are faster and more logical ways. This short information sheet has some examples and tips with QueryString, using the C# programming language. Example 1 Here we see an .aspx Web Forms page that executes when the user accesses Default.aspx. The code here is the code-behind part, Default.aspx.cs, and it is written in the C# programming language. To test the above code, run the page in the web browser on the ASP.NET development server. It will be completely blank. Try adding the string "?param=dotnet" at the end of the URL. QueryString example [C#] using System; using System.Web.UI; public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { string v = Request. QueryString ["param"]; if (v != null) { Response.Write("param is "); ...

Cookies in asp.net

Cookies are small pieces of text, stored on the client's computer to be used only by the website setting the cookies. This allows webapplications to save information for the user, and then re-use it on each page if needed. Here is an example where we save a users choice of background color: <% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " Default.aspx.cs " Inherits = " _Default " %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999/xhtml" > < head runat ="server" > < title > Cookies </ title > </ head > < body runat ="server" id ="BodyTag" > < form id ="form1" runat ="server" > < asp:DropDownList runat ="server" id ="ColorSelector...

Validation in ASP.NET 2.0

Validation server controls are set of controls that enable you to work with the information your end users inputs into application. Application should always ensure that valid data is recorded. To ensure valid data is collected, we apply set of validations to data we collect. Validation is a set of rules that you apply to the data you collect. In this way, we can bring certain degree of discipline in end user. We can understand validation under two categories: Client side validation and Server side validation. Client side validation involves validating user input before the page is posted to server. Server side validation involves performing checks on server instead of client. This is most secure form but comes at cost of performance. ASP.NET introduced smart validation server controls to implement page level validations. They are capable of performing both server side and client side validations. So, Validation server controls offer the combined power of both approaches such that t...

Show loading image during button click..

Using ASP.NET AJAX UpdateProgress Control Hi, You can use the Ajax Updatepanel with Ajax update Progress to solve this problem. Step1: Put your button in an update panel Step2: Drop an UpdateProgress to your webform and associate this with your updatepanel <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"> </asp:UpdateProgress> Step3: Create a template for your "Loading" text to be shown when you click the button and put that inside the updateprogress's <ProgressTemplate> tag <ProgressTemplate> <div>loading</div> </ProgressTemplate> you can add the some style like position absolute, etc to t...

Facebook Share here !!!

http://tiny.go2gyan.com/facebook/FacebookShare.aspx Facebook Share Developed by  Sachin Vijwal   Paste Here Any Website Url :  

Best Floating Menu

Absolute Floating Menu Many web pages don't fit on most users' screens. The visitors have to scroll to read the page contents. Such scrolling however hides the navigation menus (or a shopping cart contents) usually located at the top of the page. The javascript shown here allows to create dynamic menus which move along with scrolling. Such floating menu will be always visible on screen. The effect is achieved my moving an absolutely-positioned or relatively-positioned  DIV  box containing the menu markup. The floating  DIV  will visibly move towards the specified viewing area spot, slowing as it moves closer to it and finishing the move with a visible snap. Such animation will definitely draw user attention to the floating menu. Also available: Absolute Floating Menu packaged as a module for Joomla  makes using Absolute floating menu much simpler in Joomla environment. Features include: Free-floating  DIV  box with  position:absolute ...