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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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