For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > April 2004 > Getting values from dynamically created control.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Getting values from dynamically created control.
Jen

2004-04-27, 5:21 am

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


Chee Seong Ong

2004-04-28, 4:47 pm

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?= <freesiajen@hotmail.com>
>Subject: Getting values from dynamically created control.
>Date: Thu, 22 Apr 2004 00:16:02 -0700
>Lines: 8
>Message-ID: <61782F95-7354-4ED2-946D-339F074A6416@microsoft.com>
>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


>


Scott Mitchell [MVP]

2004-04-28, 4:47 pm

> 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
mitchell@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com