Something very odd is happening here.
I have a custom WebPart within Sharepoint which sends forms to Excel and by E-Mail. I'm using Asp.NET 3.5, Ajax, jQuery.
Inside OnInit() I'm connecting to TeamFoundation Server, opening an excel template, initializing jQuery, and loading up the css.
CreateChildControls() adds the controls to panels and such, and creates an empty literal i'm calling "litScript".
Inside PreRender(), I'm updating values based on partial (or not) postbacks and such. I also assign开发者_开发技巧 a value to litScript, which composes some layout rounding effect, a jQuery-based tab effect, and mouse-following progress icon.
I have many tabs with buttons which, upon clicked, process some stuff.
Upon assigning a random text "I'm here!" to a label inside some button click event, it reloads perfectly.
cc.GetTextControl("lblTeste").Text = myForm.PostbackMessage;
(cc.GetTextControl just returns my control).
However, by using my literal and writing
cc.GetTextControl("litScript").Text = "<somejavascript>"+myForm.PostbackMessage+"</somejavascript>";
I don't get anything.
When I do a full postback, everything loads correctly though. What is happening?
Had something to do with javascripts not changing. I just added a RegisterClientScriptBlock
and everything went fine.
精彩评论