iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi All,
I have a referenced dll which raise javascript alert message by calling page.ClientScript.RegisterClientScriptBlock(typeof(Alert), "alert", script);
But it didn't work when Webgrid do fly postback process. So How can I call RegisterClientScriptBlock when Webgrid do Fly postback (not full post back)?
Thanks and Regards,
Huy.
If you are intending to add a script block to the rendered page when WebGrid do FlyPostBack, please try to use InvokeScript method of WebGrid in OnInitializePostBack server-side event of WebGrid.
Please follow the step-by-step below carefully in order to add a script block to the rendered page.
MyScript.js
function ShowKeyCode() { var textBox = document.getElementById("Message"); alert(event.keyCode); return true; }
Default.aspx.cs
protected void WebGrid1_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { WebGrid1.ClientAction.InvokeScript("IS.AddScript('MyScript.js');"); }
If the InvokeScript doesn’t suit with your scenario, please kindly let us know.
Edited reason: add and correct step-by-step information.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname