Loading ...

Who is online?  0 guests and 0 members
home  »  blogs  »  Vijendra Shakya: January 2009

Communifire Blogs

Vijendra Shakya :January 2009 postings

Vijendra Shakya

Maintain Scroll Position of ASP.NET Ajax Rating Control

1/22/2009 by Vijendra Shakya · 1 · 4921

In ASP.NET's Ajax Rating control there is a bug. When user click on the rating control it Jumps on the top of the page because it add # with url. If you put your rating control on the bottom of the page and you click on the rating control it jumps on the top of the page.This happens because your all image tag are in HTML's Anchor <a> tag and its href attribute set to # (view page s...

Vijendra Shakya

Validate Extension of FileUpload Control

1/14/2009 by Vijendra Shakya · 1 · 5020

When we upload a file then there is validation for the extension of the upload file because if we want to uplaod a image then there is only image related extension is allowed not any other type as .doc,.txt,.rar ...... so to avoid this we apply there extension validation on the file. when user upload the file then we first check the extension of the file if extension of the file is corre...

Vijendra Shakya

Retrive Password in TextBox which is in Password mode

1/12/2009 by Vijendra Shakya · 0 · 3755

When you set the mode of the TextBox is Password and retrive the password from the DB then the TextBox will be blank for security purpose If you want to display the password in the textbox in * format then we use following way to retrive the password in Textbox and the mode of the Textbox is Password. txtPassword.Attributes.Add("value","vijendra"); where txtPassword is the name of the Te...

Vijendra Shakya

FileUpload inside the Ajax UpdatePanel

1/12/2009 by Vijendra Shakya · 2 · 9910

File upload control is not working when this control is inside the update panel.When we place the file upload control control inside the updatepanel and upload the file then FileUpload1.Hasfile is always false because file upload control is inside updatepanel then your file upload control does not post back. Because the file upload control works only when the full page postback. If you w...

Vijendra Shakya

Dynamically Genearte TextBox at runtime in ASP.Net

1/9/2009 by Vijendra Shakya · 1 · 8735

Here we discuss to generate the textox at runtime. To create the textbox at run time for that first we take a server control Panel where we place the runtime generated textbox.Here we use a textbox and button,textbox to define the number of textbox generated at runtime ant generate the textbox on the button click. following is the code for .aspx side: <div> <asp:TextBox runat="s...

Vijendra Shakya

How to Encode a password using MD5 in C#

1/9/2009 by Vijendra Shakya · 1 · 5961

Many developers save the password in normal form in Database which is not secure for the user because every one who have the access of the database view your password it is very harmful for the user. To encode the password use the using System.Security.Cryptography namespace; Following is the method to encode the pwd in MD5 format. using System; using System.Collections; using System.Con...

Vijendra Shakya

Insert/Add a ListItem to a DropDownList

1/5/2009 by Vijendra Shakya · 0 · 5001

We can insert the ListItem in Dropdownlist at any postion there is two ways to insert the listItem in the Dropdownlist. Always remember Add and Insert is different Insert takes 2 parameter and Add takes only one Parameter. syntax: drpUserName.Items.Insert(0, new ListItem("Please Select User Name", "0")); drpUserName.Items.Add(new ListItem("Please Select User Name", "0")); This will inser...

Vijendra Shakya

Change the color of the Textbox

1/5/2009 by Vijendra Shakya · 0 · 11861

Change the color of the userinput fileld if it is blank(empty). Example: first we apply RequiredField Validation and CustomValidator to validate the user input of check the empty control if any user input control is empty then we use javascript to change the color ogf the user input control. following is the javascript code to change the color of the input control. <script language="j...

Vijendra Shakya

Pass Query String and retrieve it for one or more than one values in ASP.Net

1/4/2009 by Vijendra Shakya · 0 · 7943

QueryString: In ASP.NET QueryString plays very imporatnt role by which we get value(s) from one page to another page(which we send in QueryString). we send the value in QueryString something like: Response.Redirect("default.aspx?userId=12"); we also send the value in QueryString like: Response.Redirect("default.aspx?userId=" +txtName.Text .Trim()); and that QueryString value retrive in f...

Vijendra Shakya

Delete multiple records from repeater or Datalist

1/2/2009 by Vijendra Shakya · 0 · 4413

Delete the multiple recored from repeter or datalist . plz go through this example: <asp:Button ID="bntDelete" runat="server" Text="Delete " CommandName="Delete" oncommand="bntDelete_Command" /> <br /> <asp:Repeater ID="repeater1" runat="server" DataMember="EmailID"> <HeaderTemplate> <tr> <th> <input type="checkbox" id="checkAll" onclick="CheckAll(t...

Page 1 of 1 (10 items)

Product Spotlight

ASP.NET Hosting Spotlight

Join CodeAsp.Net for FREE Today!

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:

 

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?