|
-
Nov 20th, 2006, 12:02 PM
#1
Thread Starter
Fanatic Member
dynamically build <type="hidden"> elements with code behind
using asp.net:
i have a hash collection and would
like to iterate this collection and
dynamically build <type="hidden"> elements
on the html page and populate them with values
from this collection.
reason: I need to pass these values to another site.
can this be done ?
Last edited by ZeBula8; Nov 22nd, 2006 at 03:25 PM.
Reason: [RESOLVED]
-
Nov 20th, 2006, 03:06 PM
#2
Re: dynamically build <type="hidden"> elements with code behind
What version of .net are you using (always specify version )?
If 1.0/1.1: look at Page.RegisterHiddenField
if 2.0: look at ClientScript.RegisterHiddenField
-
Nov 21st, 2006, 03:52 AM
#3
Addicted Member
Re: dynamically build <type="hidden"> elements with code behind
Or you could use a literal and populate that on the page load:
ltlFields.Text = "<input type=""hidden"" name=""item_name"" value=""item_value" & iValue & """ />"
HTH
F
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|