473,473 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem Accessing Dynamicially created HTML Control in Code Behind

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
Nov 18 '05 #1
1 1172
for an <input> to post back, it must have a name attribute, as the postback
is the name/value pair.

-- bruce (sqlwork.com)
"Himanshu" <Hi******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
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
ng()+"' 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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
5
by: | last post by:
Hi, I'm trying to use the cookie munging session handling behaviour of asp.net instead of cookies themselves as I'm finding quite a few people are barring cookies (especially AOL users). If I...
3
by: Lynn | last post by:
Hello, I have some user controls on a page...one for the user to fill in name, address, etc., and the other for the user to fill in credit card information. I have built the user controls in...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
7
by: Alan Silver | last post by:
Hello, I have installed the 2.0 framework, and am looking at converting some of my 1.1 pages to use partial classes. I don't (yet) have VS2005, so I'm doing this by hand, but am having problems....
1
by: Jeff Lynch | last post by:
I'd like to add the following attributes to the Login control's Login Button to create a CSS rollover effect. How can I access the control's login button from the page's code-behind? ...
5
by: Siva | last post by:
Hello I have a dropdownlist inside the gridview as a template column defined as follows: <asp:TemplateField HeaderText="Choose Location"> <ItemTemplate> <asp:DropDownList ID="ddlChooseLoc"...
1
by: Jeff User | last post by:
hi all Using C#, .NET1.1. I need to pass a string of text to the final html output and then capture it with java script on the client side. I found that I can place my string in and then...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.