How modify <INPUT> value

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I have some hidden <INPUT> HTML fields in my ASPX page.

How do I modify the value (in VB.NET) based on a web.config appsettings
setting, such as ConfigurationSettings.Appsettings("MyValue")?

Here is the HTML field:
<input type="hidden" name="bn" value="PP-SubscriptionsBF"> <input
type="hidden" name="a3" value="XXXXXXXXX">

Thanks!
 
Never mind, this is how I did it...
<input type="hidden" name="bn" value="PP-SubscriptionsBF"> <input>
type="hidden" name="a3" value="<%=MyValue%>">

Then I just set MyValue as a public var and set it to look at the
web.config.

Thanks! :)
 
Another way:

<input type="hidden" name="a3" id="a3">

And in CodeBehind:

Page_Load:
a3.Value = MyValue

Now, you don't need to make MyValue public. And if at all, you ever
need MyValue in aspx page, try making it just protected and not public.
 
Back
Top