Click here to Skip to main content
15,902,777 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: hyperlinks Pin
Quinten.Miller24-Apr-07 13:08
Quinten.Miller24-Apr-07 13:08 
QuestionHttpWebRequest Hanging on Post GetResponse() Pin
Tristan Rhodes24-Apr-07 12:02
Tristan Rhodes24-Apr-07 12:02 
QuestionCustomising the asp:CreateUserWizard Control Pin
Brendan Vogt24-Apr-07 9:46
Brendan Vogt24-Apr-07 9:46 
QuestionBack & Forward Button in browser Pin
aransiola24-Apr-07 7:48
aransiola24-Apr-07 7:48 
AnswerRe: Back & Forward Button in browser Pin
Quinten.Miller24-Apr-07 13:12
Quinten.Miller24-Apr-07 13:12 
QuestionDisplaying table contents Pin
krk101124-Apr-07 7:40
krk101124-Apr-07 7:40 
QuestionDisplay a .snp file on a ASP.NET page Pin
Ibuprofen24-Apr-07 7:40
Ibuprofen24-Apr-07 7:40 
QuestionGrab value of input control via Page.FindControls - issue Pin
DeepToot24-Apr-07 5:09
DeepToot24-Apr-07 5:09 
ok, I am dynamically creating hidden controls in my page by using:
<br />
ClientScriptManager cs = Page.ClientScript;<br />
cs.RegisterHiddenField("hid" + name.Replace(" ", ""), "");<br />


I am trying to reference this control after they hit submit by doing this:
<br />
HtmlInputHidden hc = (HtmlInputHidden)Page.FindControl("hidChicago");<br />


it keeps coming up null..
I wasn't sure what to Cast it as since it was created using RegisterHiddenField.
I tried both HtmlInputHidden and HiddenField and still null.

This page is a child to a Master Page.

When using RegisterHiddenField it adds it in the area where the __EVENTTARGET and __VIEWSTATE would be found.

My question is, why wouldnt the control be found when looking from the Page level?

Also, here is what that RegisterHiddenField created:
<br />
<input type="hidden" name="hidChicago" id="hidChicago" value="" /><br />


It didnt put the "ct100_ContentPlaceHolder1" in front of it, either because its not in the ContentHolder, which would make sense, or its not registering it with a runat=server.

what do you guys think?




Steve Welborn
Software Engineer
BitWise Solutions
AnswerRe: Grab value of input control via Page.FindControls - issue Pin
badgrs24-Apr-07 5:57
badgrs24-Apr-07 5:57 
GeneralRe: Grab value of input control via Page.FindControls - issue Pin
DeepToot24-Apr-07 6:59
DeepToot24-Apr-07 6:59 
Questionwindow.confirm Pin
Imran Khan Pathan24-Apr-07 4:05
Imran Khan Pathan24-Apr-07 4:05 
AnswerRe: window.confirm Pin
Arun.Immanuel24-Apr-07 4:15
Arun.Immanuel24-Apr-07 4:15 
GeneralRe: window.confirm Pin
Sujit Gupta24-Apr-07 7:51
Sujit Gupta24-Apr-07 7:51 
AnswerRe: window.confirm Pin
badgrs24-Apr-07 5:51
badgrs24-Apr-07 5:51 
QuestionPlz find out error in my code. Pin
Care Career24-Apr-07 2:27
Care Career24-Apr-07 2:27 
AnswerRe: Plz find out error in my code. Pin
Colin Angus Mackay24-Apr-07 2:32
Colin Angus Mackay24-Apr-07 2:32 
AnswerRe: Plz find out error in my code. Pin
Russell Jones24-Apr-07 2:42
Russell Jones24-Apr-07 2:42 
AnswerRe: Plz find out error in my code. Pin
Md. Ismail24-Apr-07 2:50
Md. Ismail24-Apr-07 2:50 
AnswerRe: Plz find out error in my code. Pin
Dave Sexton24-Apr-07 3:16
Dave Sexton24-Apr-07 3:16 
GeneralRe: Plz find out error in my code. Pin
DeepToot24-Apr-07 5:11
DeepToot24-Apr-07 5:11 
GeneralRe: Plz find out error in my code. Pin
DeepToot24-Apr-07 5:13
DeepToot24-Apr-07 5:13 
GeneralRe: Plz find out error in my code. Pin
Dave Sexton24-Apr-07 10:36
Dave Sexton24-Apr-07 10:36 
AnswerRe: Plz find out error in my code. Pin
DeepToot24-Apr-07 5:21
DeepToot24-Apr-07 5:21 
AnswerRe: Plz find out error in my code. Pin
Sujit Gupta24-Apr-07 7:57
Sujit Gupta24-Apr-07 7:57 
Questionprint xsl Pin
TheEagle24-Apr-07 2:13
TheEagle24-Apr-07 2:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.