Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: dynamic controls not updated

Reply
Thread Tools

Re: dynamic controls not updated

 
 
Natty Gur
Guest
Posts: n/a
 
      06-25-2003
try to set Response.Expires = -1. this will prevent your browser to get
a page from the cache.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Kelly Lim
Guest
Posts: n/a
 
      06-25-2003


That didn't work.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      06-26-2003
Let’s check it on simple project with one page and 2 dynamic controls.
Don’t copy from your existing project create new. It is still happening?
If so send the project source. if the new project works OK it might be
something in your code logic.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Kelly Lim
Guest
Posts: n/a
 
      06-26-2003
Here is my code (After postback, I dynamically recreate the controls but
with some changes but the changes aren't reflected:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim Radio1 As RadioButton
Dim Radio2 As RadioButton
Dim TextBox1 As TextBox

If Not Me.IsPostBack Then
TextBox1 = New TextBox()
TextBox1.ID = "myTestBox1"
TextBox1.Text = "Before postback"

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(TextBox1)

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(New
LiteralControl("<br>"))

Radio1 = New RadioButton()
Radio1.ID = "myRadio1"
Radio1.Text = "Red"
Radio1.GroupName = "Color"
Radio1.Checked = False

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(Radio1)

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(New
LiteralControl("<br>"))

Radio2 = New RadioButton()
Radio2.ID = "myRadio2"
Radio2.Text = "Blue"
Radio2.GroupName = "Color"
Radio2.Checked = False

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(Radio2)

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(New
LiteralControl("<br>"))

Else

TextBox1 = New TextBox()
TextBox1.ID = "myTestBox1"
TextBox1.Text = "After postback"

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(TextBox1)

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(New
LiteralControl("<br>"))

Radio1 = New RadioButton()
Radio1.ID = "myRadio1"
Radio1.Text = "Red"
Radio1.GroupName = "Color"
Radio1.Checked = True

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(Radio1)

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(New
LiteralControl("<br>"))

Radio2 = New RadioButton()
Radio2.ID = "myRadio2"
Radio2.Text = "Blue"
Radio2.GroupName = "Color"
Radio2.Checked = True

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(Radio2)

Me.FindControl("Form1").FindControl("plhTest").Con trols.Add(New
LiteralControl("<br>"))

End If

End Sub




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Dynamic Controls created by Dynamic Controls Ronald ASP .Net 2 01-17-2006 12:44 AM
Dynamic Variables? OR Dynamic Controls =?Utf-8?B?VGVyb3M=?= ASP .Net 1 08-10-2004 01:13 PM
Dynamic Controls, Placeholder, Retrieve Information from Dynamic Controls Denny Smolinski via .NET 247 ASP .Net Web Controls 1 05-04-2004 09:15 PM
Datagrid not updated during delete, but updated during insert and update Dmitry Korolyov ASP .Net Datagrid Control 0 09-22-2003 10:57 AM
dynamic controls not updated Kelly ASP .Net 1 06-25-2003 02:48 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57