>From first glance, I see you need to do the following, and it MIGHT work.
1.) add a runat="server" tag to the hidden field.
2.) Cast the hidden field when you do the GetControl method.

Again, it MIGHT work.

On Wed, Aug 5, 2009 at 2:04 PM, Cerebrus <[email protected]> wrote:

>
> It would be difficult to give a definitive answer without seeing the
> markup of your FormView (especially with relevance to the hidden
> fields).
>
> And no, you can pass a value via Javascript to any control that is
> rendered on the client. They all are accessible to client script if
> they are rendered as part of the HTML DOM.
>
> On Aug 5, 2:18 pm, Tim Dawg <[email protected]> wrote:
> > Hello all,
> >
> > I'm a relatively new ASP.net programmer and am having a problem I'm
> > hoping one of you pros out there can help me out with.  I've got a
> > formview setup and working properly however within the formview I have
> > some hidden input tags that contain various pieces of data that the
> > user could care less about (which is why I don't want them to see
> > it).  I don't know how to read the data out of the html input tags so
> > I can add it to my dictionary when submitting the formview.  Normally
> > if you have a tag such as:
> >
> > <input id="ShipAddressID" type="hidden" style="width:340px"
> > value="whatever" />
> >
> > You could read it in code using ShipAddressID.Value but I cannot do
> > that when the input is within a formview control.  I've tried this but
> > it doesn't work either.
> >
> > FormView1.FindControl("ShipAddressID")
> >
> > I have to use an hidden input because I have a popup window that uses
> > javascript to pass a value back to the parent page so I can't use a
> > label or any other asp.net control (that I know of).  As far as I
> > know, I can only pass a value back via javascript to standard HTML
> > input tags.
> >
> > So any ideas?
> > Thanks so much!
> > -Tim
>

Reply via email to