I figured it out.  Thanks.  I need to use the
Request.Params.Get("name") to get that hidden form data in the init
method and re-add the hidden fields to the form.Controls

On Sep 10, 2:46 am, Cerebrus <[EMAIL PROTECTED]> wrote:
> Common newbie question, Adailey! The problem can be solved by re-
> adding the controls to the Page's control collection upon postback. I
> suggest reading up on the Page lifecycle in ASP.NET for a better
> understanding of what's going on behind the scenes.
>
> On Sep 10, 1:28 am, adailey <[EMAIL PROTECTED]> wrote:
>
> > I am adding some HiddenFields in the code behind Page_Init method that
> > is getting added to the form via form.Controls.Add(hiddenfield);  This
> > works fine.  When I view the source code of what is rendered in the
> > browser, it shows up as expected in the source view of the page.
>
> > However, my issue comes when I try to get at those hidden fields after
> > a submit is sent.  I would think that in the Page_Init method I would
> > be able to get at those hidden fields Control cont =
> > this.FindControl("ID") but they are not even there.  The only Controls
> > that are there are the ones that were created in the aspx page with
> > the <asp:> tags.
>
> > Sorry, this is probably an easy question.  Long time Java developer,
> > new to asp.net and C#.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to