Problem Accessing Dynamicially created HTML Control in Code Behind

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have created a table in my webform and in that table i am
creating/assigning dynamic HTML.
I have added few control e.g strInnerHtml.Append("<td><input runat='server'
type='text' Class='HomeContent' MaxLength='100' width = '100%' value
='"+oDSGetCustContract.Tables[0].Rows[intCounter]["ORG_CONTRACT_NUM"].ToString()+"' id='txtOriginalContractNumber"+intCounter+"' ></td>");
My Problem is that they get rendered and displayed appropriately but when i
try to access them on click of Button using Request.Form("") they does not
appear.I have checked request.form.count as well and they do not appear in it
as well.
Please somebody tell me why the controls do not appear in request.form and
is there any method to access them.

regards
Himanshu
 
for an <input> to post back, it must have a name attribute, as the postback
is the name/value pair.

-- bruce (sqlwork.com)


Himanshu said:
Hi,
I have created a table in my webform and in that table i am
creating/assigning dynamic HTML.
I have added few control e.g strInnerHtml.Append("<td><input runat='server'
type='text' Class='HomeContent' MaxLength='100' width = '100%' value
='"+oDSGetCustContract.Tables[0].Rows[intCounter]["ORG_CONTRACT_NUM"].ToStri
 

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