Getting values from dynamically created control.

G

Guest

Hi

I have created some controls (HtmlInputText, HtmlGenericControl, TextBox) dynamically. But I have problem getting the values from these controls to save them. Is there a way to do that?

Regards and Many thanks
Jen
 
C

Chee Seong Ong

A suggestion, which may not be the best way, is to write the values to DB
from the client side.

--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).


--------------------
Thread-Topic: Getting values from dynamically created control.
thread-index: AcQoOasVlN8Cs8zqRKuFkUJeYvqmQQ==
X-WN-Post: microsoft.public.dotnet.framework.aspnet
From: =?Utf-8?B?SmVu?= <[email protected]>
Subject: Getting values from dynamically created control.
Date: Thu, 22 Apr 2004 00:16:02 -0700
Lines: 8
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:228195
NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi

I have created some controls (HtmlInputText, HtmlGenericControl, TextBox)
dynamically. But I have problem getting the values from these controls to
save them. Is there a way to do that?

Regards and Many thanks,
Jen
 
S

Scott Mitchell [MVP]

I have created some controls (HtmlInputText, HtmlGenericControl, TextBox)
dynamically. But I have problem getting the values from these controls to
save them. Is there a way to do that?

Jen, are you certain you are recreating these controls on every postback
to the page? If so, you should be able to programmatically reference
them after they have been created and read their property values.

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 
G

Guest

Hi Scott,

I manage to get the values and save them successfully after recreating the controls on every postback. Thanks.

But it seems that this has slow my saving process. I need about 1min to save any changes in that form. Do you know of any way, I can resolve this. I currently have to dynamically create 250 columns on each postback.

Thanks.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top