Invisibe control problem

  • Thread starter Thread starter dee
  • Start date Start date
D

dee

Hi

I'm trying to send a value calcutated in a WebForm to a target WebForm.
Staying away form QueryString() I make a hidden asp:TextBox and put
the value in there a ala old asp.
The target WebForm only can retrieve this value when the TextBox control
is Visible.
But this method worked in asp.
Appreciate any ideas. Thanks.
Dee
 
dee said:
Hi

I'm trying to send a value calcutated in a WebForm to a target WebForm.
Staying away form QueryString() I make a hidden asp:TextBox and put
the value in there a ala old asp.
The target WebForm only can retrieve this value when the TextBox control
is Visible.
But this method worked in asp.
Appreciate any ideas. Thanks.
Dee
Setting Visible in essence removes it from being spit out in the HTML
sent to the user.

http://msdn.microsoft.com/library/d.../frlrfSystemWebUIControlClassVisibleTopic.asp

Use a hidden field instead:

<INPUT type=hidden id=Hidden1 name=Hidden1 runat="server">
 
dee said:
How can i maniputae a regular <INPUT> form within .NET code?
Thanks.

Setting Visible in essence removes it from being spit out in the HTML sent
to the user.

http://msdn.microsoft.com/library/d.../frlrfSystemWebUIControlClassVisibleTopic.asp

Use a hidden field instead:

<INPUT type=hidden id=Hidden1 name=Hidden1 runat="server">
By adding an id and runat="server" attribute to just about any HTML tag,
you created an HTML server control. Not as powerful as the normal
controls, but get the job done. Check out the
System.Web.UI.HtmlControls.HtmlInputHidden class for more info.

Note ural's solution works as well by using CSS to hide it...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top