Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 23 Jul 2008 14:04:26 -0400,    group: microsoft.public.dotnet.framework.aspnet.webcontrols        back       


Page_PreRender LABEL never changes   
After a button click, nothing gets posted back to the form.  The 
Page_PreRender is firing ... I am tracing it through line by line.  But
lbl_ErrMsg3 never changes.  (I also tried it with a textbox and it doesn't 
change the Text either.)

Does anyone know what is wrong?
Thanks


HTML in ascx page
----------------------
<asp:Label ID="lbl_ErrMsg3" runat="server" Text="test3"></asp:Label>


vb in the ascx.vb page
----------------------
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As 
System.EventArgs) Handles Me.PreRender
  Me.lbl_ErrMsg3.Text = "test this"
  Me.lbl_ErrMsg3.Visible = True
End Sub
date: Wed, 23 Jul 2008 14:04:26 -0400   author:   Gene Berger

Re: Page_PreRender LABEL never changes   
Tried to repro and it works fine here (this is a user control hosted in a 
page ?). I'm not sure how button clicks and postback are related to this. I 
just see the updated label regardless of wether or not this is a postback.

Looks like you perhaps have multiple problems. It would be best to take them 
one after the other...

For the label issue, don't you reload the usercontrol dynamically from the 
hosting page or something ?

What if you just place this user control on a newly created page without any 
other code and runs ? Do you see "test this" or "test3" ?


--
Patrice

"Gene Berger"  a écrit dans le message de 
groupe de discussion : uldxM6O7IHA.4988@TK2MSFTNGP04.phx.gbl...
> After a button click, nothing gets posted back to the form.  The 
> Page_PreRender is firing ... I am tracing it through line by line.  But
> lbl_ErrMsg3 never changes.  (I also tried it with a textbox and it doesn't 
> change the Text either.)
>
> Does anyone know what is wrong?
> Thanks
>
>
> HTML in ascx page
> ----------------------
> <asp:Label ID="lbl_ErrMsg3" runat="server" Text="test3"></asp:Label>
>
>
> vb in the ascx.vb page
> ----------------------
> Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As 
> System.EventArgs) Handles Me.PreRender
>  Me.lbl_ErrMsg3.Text = "test this"
>  Me.lbl_ErrMsg3.Visible = True
> End Sub
>
>
date: Thu, 24 Jul 2008 13:13:42 +0200   author:   Patrice http://www.chez.com/scribe/

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us