Hi
My textbox and linkbutton (asp.net)is inside the repeater.How can i enable textbox with java script function upon click of a link button .It is working fine in vb.net.I want to avoid the post back on each click of Edit link button,Below is the textbox
and link button
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# DataBinder.Eval(Container.DataItem,"LicenseID") %>' Enabled="False" BackColor="Gray" BorderStyle="None"></asp:TextBox>
<script>
function MyFunction(txtRefId)
{
var
textBox = document.getElementById(txtRefId);
document.getElementById("textBox").disabled
= false;
}
</script>
Below vb.net code is working fine.I want to accomplish this with the javascript function for the Edit.
If e.CommandName="edit"Then
DirectCast(e.Item.FindControl("TextBox2"),
TextBox).Enabled =True
DirectCast(e.Item.FindControl("Textbox2"),
TextBox).BorderStyle =BorderStyle.NotSet
DirectCast(e.Item.FindControl("Textbox2"),
TextBox).BackColor = Drawing.Color.White
endif
Appreciate your help..Thanks