By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,054 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,054 IT Pros & Developers. It's quick & easy.

Accessing getElementById in c#

P: n/a
AAJ
Hi all

is it possible to replace the following javascript with an equivalent on the
server side c#

<script type="text/javascript" >
var txt1 = document.getElementById("txtProblem");
txt1.title = "Enter the description of the problem.";
</script>

thanks

Andy
Oct 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Is this what you want.
http://msdn2.microsoft.com/en-us/lib...ementbyid.aspx

chanmm

"AAJ" <a.a.comwrote in message
news:u%****************@TK2MSFTNGP03.phx.gbl...
Hi all

is it possible to replace the following javascript with an equivalent on
the server side c#

<script type="text/javascript" >
var txt1 = document.getElementById("txtProblem");
txt1.title = "Enter the description of the problem.";
</script>

thanks

Andy

Oct 3 '06 #2

P: n/a
If your control is declared as <input id="txtProblem" runat="server">, you
could just use txtProblem.Attribute.Add("title", "Enter the description of
the problem.");

"AAJ" <a.a.com撰寫於郵件新聞:u%****************@TK2MSFTN GP03.phx.gbl...
Hi all

is it possible to replace the following javascript with an equivalent on
the server side c#

<script type="text/javascript" >
var txt1 = document.getElementById("txtProblem");
txt1.title = "Enter the description of the problem.";
</script>

thanks

Andy

Oct 4 '06 #3

P: n/a
AAJ
many thanks guys

that does exactly what I want

Andy

"Lau Lei Cheong" <le****@yehoo.com.hkwrote in message
news:OO**************@TK2MSFTNGP06.phx.gbl...
If your control is declared as <input id="txtProblem" runat="server">, you
could just use txtProblem.Attribute.Add("title", "Enter the description of
the problem.");

"AAJ" <a.a.com撰寫於郵件新聞:u%****************@TK2MSFTN GP03.phx.gbl...
>Hi all

is it possible to replace the following javascript with an equivalent on
the server side c#

<script type="text/javascript" >
var txt1 = document.getElementById("txtProblem");
txt1.title = "Enter the description of the problem.";
</script>

thanks

Andy


Oct 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.