Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > disabled dynamically added controls and postback

Reply
Thread Tools

disabled dynamically added controls and postback

 
 
djk
Guest
Posts: n/a
 
      11-25-2004
Hi all!

Please help me with the following real-trouble:

- I have dynamically created controls on page
- Everything works unless I set for some controls .Enabled = false

In such a case stored value for the disabled control is lost (not sent by
MSIE back to server).

But it works for static controls.

What's wrong?

Thanks a lot

djk


 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      11-26-2004
You need to store the viewstate of dynamically created controls. There's a
special placeholder control here that you can use. Just add your controls to
it:

http://www.denisbauer.com/ASPNETCont...aceholder.aspx


"djk" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi all!
>
> Please help me with the following real-trouble:
>
> - I have dynamically created controls on page
> - Everything works unless I set for some controls .Enabled = false
>
> In such a case stored value for the disabled control is lost (not sent by
> MSIE back to server).
>
> But it works for static controls.
>
> What's wrong?
>
> Thanks a lot
>
> djk
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confusion Over Postback, ViewState and Dynamically Added Controls =?Utf-8?B?Q2hyaXN0aWFuIE51bmNpYXRv?= ASP .Net 1 05-03-2005 12:02 AM
disabled dynamically added controls and postback djk ASP .Net 2 11-26-2004 08:21 AM
Dynamically added controls and postback Matthew Smith ASP .Net 1 05-16-2004 07:06 PM
Re: Dynamically added controls and postback Phil Winstanley [Microsoft MVP ASP.NET] ASP .Net 0 05-16-2004 09:30 AM
newbie: Dynamically added controls are lost after postback NotYetaNurd ASP .Net 1 11-07-2003 01:31 PM



Advertisments