Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > how to get form id in a composite control?

Reply
Thread Tools

how to get form id in a composite control?

 
 
Robin Lilly'
Guest
Posts: n/a
 
      11-18-2004
Hi,

I have a composite control that I need to reference the form id to build
some javascript that I am pushing out several places, such as:

_Anchor.Attributes.Add("OnClick", "JavaScriptopUpCalendar(this, document."
& _formId & ".elements['" & _TextBox.UniqueID & "'], ""m/d/yyyy"")")



Where _formId would need to be the page form tag.

Thanks,

Robin


 
Reply With Quote
 
 
 
 
Scott Mitchell [MVP]
Guest
Posts: n/a
 
      11-18-2004
Robin, I've wondered this myself, and after poking through the source
code using Reflector [http://www.aisto.com/roeder/dotnet/], I was unable
to find a means. The approach used by Steve Stchur in this article,
Maintaining Scroll Position on Postback
[http://aspnet.4guysfromrolla.com/art...111704-1.aspx], offers one
workaround - recursing through the control hierarchy, searching for an
HtmlForm object.

If there is another way, please let me know!

--

Scott Mitchell
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
Reply With Quote
 
 
 
 
Robin Lilly
Guest
Posts: n/a
 
      11-19-2004
Scott,

Thanks for the reply. I'm going to take the one from Steve and put it in
a Utilites class. I had been really struggling looking at the page
class, searching, etc trying to figure where the "form id tag" property
was located.

Thanks,

Robin Lilly
http://www.iLogBook.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments