Let say, you have a Textbox with some value. When you choose some items from a dropdown list, this textbox will be hidden but the value will be there. When you submit the form, this textbox's value will be submitted.
To avoid this, we can use javascript so that when the textbox hidden, we can make it empty or assign something specific value whatever you want.
function assignSomeValue()
{
// to hide the textbox
document.getElementById('<%= rajTextBox.ClientID%>').style.visibility = "hidden";
// to assign somevalue after hidden
documnet.getElementById('<%= rajTextBox.ClientID%>').value="assign something";
}
Happy Programming !!!
No comments:
Post a Comment
Highly Appreciated your comments