Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET: Accessing a Tag with C#

Reply
Thread Tools

ASP.NET: Accessing a Tag with C#

 
 
msnews.microsoft.com
Guest
Posts: n/a
 
      07-22-2003
Hi,

IN ASP.NET PAGE I HAVE DEFINED THE DIV TAG AS FOLLOWS:I want to access the
value in the code behind(c#) .

<div align="left" autopostback = true class="clsTitle"
style="VISIBILITY:hidden" id="HiddenFlag" runat="server"></div>

I am accessing the div tag in the code behind as follows:

string aa = "<SCRIPT FOR=window EVENT=onload LANGUAGE='JScript'>var a;a =
confirm('Shift is not Valid :" + aBE.Reason + " Do u want to override shift
validation warning message?');document.all." +
e.Item.FindControl("btnAdd").ClientID + ".click();HiddenFlag.innerText =
a;</SCRIPT>";

Page.RegisterStartupScript("tt",aa);

Althogh when i user alert(a) in the script it return true/false But when i
try to access the InnerHtml property as following i always get empty string.

if (HiddenFlag.InnerHtml == "true")

{

}

What is wrong i am doing it.

THANKS

EKTA





Please let me know what i am doing wrong


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
To vlan tag or not to tag? budyerr Cisco 1 07-08-2004 03:45 AM
using param or out tag inside sql tag (jsp/jstl/tomcat) shahbaz Java 0 10-27-2003 02:46 AM
struts tag inside a tag kishan bisht Java 1 07-08-2003 11:04 PM
How to embed the <jsp:plugin> tag into a tag handler class...HELP !! jstack Java 1 07-04-2003 06:58 PM



Advertisments