W
Wayne Sepega
I have a custom control I wrote, at first it inherited from
System.Web.UI.WebControls.Button
I later found that I couldn't do what I needed inheriting from button, so I
updated the control to inherit from and implement the following:
WebControl, IPostBackEventHandler
The assembly this control is in is strong named and GACed, but I wasn't
updating the version # as the assembly hasn't officially been deployed.
In the new code I created a property named TEXT, and had it read/write from
a private field member, and have the following in the AddAttributesToRender
override I did:
writer.AddAttribute(HtmlTextWriterAttribute.Value, Text);
I then built and deployed the assembly, in the process there was an
IISReset.
Now for the ODD behavior. Our pages would load with the new button, I know
it was using the new one due to Java Script the button was generating, but
the Text would come up blank for all instances of the button. Opening the
web site in VSS and simply rebuilding it would cause the Text property to be
populated correctly.
The control is a GACed component, all properties of a button that were
actually saved to the ASPX exist on the new button. Comparing the code in
VSS to that on my drive after the rebuild shows no differences in it. I
don't understand why I HAD to build/Rebuild the web app for this to work
correctly. On my dev box I don't have the app published, but just the code
so it should be doing a recompile each time, but it wouldn't work until I
rebuilt the app in VS.
Any one have any ideas?
Wayne
System.Web.UI.WebControls.Button
I later found that I couldn't do what I needed inheriting from button, so I
updated the control to inherit from and implement the following:
WebControl, IPostBackEventHandler
The assembly this control is in is strong named and GACed, but I wasn't
updating the version # as the assembly hasn't officially been deployed.
In the new code I created a property named TEXT, and had it read/write from
a private field member, and have the following in the AddAttributesToRender
override I did:
writer.AddAttribute(HtmlTextWriterAttribute.Value, Text);
I then built and deployed the assembly, in the process there was an
IISReset.
Now for the ODD behavior. Our pages would load with the new button, I know
it was using the new one due to Java Script the button was generating, but
the Text would come up blank for all instances of the button. Opening the
web site in VSS and simply rebuilding it would cause the Text property to be
populated correctly.
The control is a GACed component, all properties of a button that were
actually saved to the ASPX exist on the new button. Comparing the code in
VSS to that on my drive after the rebuild shows no differences in it. I
don't understand why I HAD to build/Rebuild the web app for this to work
correctly. On my dev box I don't have the app published, but just the code
so it should be doing a recompile each time, but it wouldn't work until I
rebuilt the app in VS.
Any one have any ideas?
Wayne