getting the value of an asp element with javascript
-
hi is it possible to get an ASP element with javascript? I'm trying to get the text of an asp textbox (or the value of input type text) that is nested within an ASP TemplateField . thanks in advance j
Yes , First find the control bby control id like :
var obj=document.getElementById('Controlid').vlaue;
Parwej Ahamad g.parwez@gmail.com
-
hi is it possible to get an ASP element with javascript? I'm trying to get the text of an asp textbox (or the value of input type text) that is nested within an ASP TemplateField . thanks in advance j
-
Yes , First find the control bby control id like :
var obj=document.getElementById('Controlid').vlaue;
Parwej Ahamad g.parwez@gmail.com
-
You can use document.getElementById(fieldID).
Errors are like Mini Skirts, shorter they get, more revealing they become.
-
hi is it possible to get an ASP element with javascript? I'm trying to get the text of an asp textbox (or the value of input type text) that is nested within an ASP TemplateField . thanks in advance j
-
hi dude, suppose the textbox id is txtname give like this var name = document.getelementbyid(txtname).value; here txtname-->controlid as mentioned by parwej u got it now
T.Balaji
sorry if i'm missing something or wasn't clear enough : I need the id for an ASP control that within a GridView (as mentioned - nested within asp:TemplateField) so for example if my code is: <asp:TextBox runat="server" ID="txtName">> after rendering the TextBox id will be something like: "ctl00_ContentPlaceHolder1_gridView_ctl12_txtName" thanks