How to get clientid of asp.net textbox
-
Hello friends In my app i have ti transfer some text from one textbox to another textbox. for that i want to retriev the element by its ClientID but how to get it my JS file. Please help me............
Deepak Nigam
-
Hello friends In my app i have ti transfer some text from one textbox to another textbox. for that i want to retriev the element by its ClientID but how to get it my JS file. Please help me............
Deepak Nigam
-
Hello friends In my app i have ti transfer some text from one textbox to another textbox. for that i want to retriev the element by its ClientID but how to get it my JS file. Please help me............
Deepak Nigam
Use the ClientID property of the control on the server side, and inject it as javascript so that you have a variable that contains that value, on the client side.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hello friends In my app i have ti transfer some text from one textbox to another textbox. for that i want to retriev the element by its ClientID but how to get it my JS file. Please help me............
Deepak Nigam
Read Client ID
var txtTextBox="<%=txtMyTextBox.ClientID %>";
Get Value From Thisvar myValue=document.GetElementByID("txtTextBox");
Best Regards ----------------- Abhijit Jana Microsoft Certified Professional "Success is Journey it's not a destination"
-
Read Client ID
var txtTextBox="<%=txtMyTextBox.ClientID %>";
Get Value From Thisvar myValue=document.GetElementByID("txtTextBox");
Best Regards ----------------- Abhijit Jana Microsoft Certified Professional "Success is Journey it's not a destination"
exact approach dear but use var myValue=document.getElementByID(txtTextBox); instead of var myValue=document.GetElementByID("txtTextBox"); or we can save a variable by using var myValue=document.getElementByID("<%=txtMyTextBox.ClientID %>");
Ashish Sehajpal
modified on Wednesday, April 9, 2008 4:12 AM
-
exact approach dear but use var myValue=document.getElementByID(txtTextBox); instead of var myValue=document.GetElementByID("txtTextBox"); or we can save a variable by using var myValue=document.getElementByID("<%=txtMyTextBox.ClientID %>");
Ashish Sehajpal
modified on Wednesday, April 9, 2008 4:12 AM
;)
Best Regards ----------------- Abhijit Jana Microsoft Certified Professional "Success is Journey it's not a destination"
-
exact approach dear but use var myValue=document.getElementByID(txtTextBox); instead of var myValue=document.GetElementByID("txtTextBox"); or we can save a variable by using var myValue=document.getElementByID("<%=txtMyTextBox.ClientID %>");
Ashish Sehajpal
modified on Wednesday, April 9, 2008 4:12 AM
Ashish Sehajpal wrote:
but use var myValue=document.getElementByID("txtTextBox"); instead of var myValue=document.GetElementByID("txtTextBox");
LOL - I think you meant to remove the quotes there somewhere.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Ashish Sehajpal wrote:
but use var myValue=document.getElementByID("txtTextBox"); instead of var myValue=document.GetElementByID("txtTextBox");
LOL - I think you meant to remove the quotes there somewhere.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
:-\ even u have not noticed the SYNTAX of function dear..... :D
Ashish Sehajpal
-
:-\ even u have not noticed the SYNTAX of function dear..... :D
Ashish Sehajpal
Oh, I see. Yes, the G needed to be a g, AND the name needed not to be in quotes, so as to use the variable that was being declared.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )