Below you will find pages that utilize the taxonomy term “postback”
Posts
Reload page in js: RefreshPage
There are many ways to reload / refresh a page in javascript. One of them is as in discoveringsharepoint.wordpress.com describes:
window.location.reload() ```Today I found some tools which are shipped with ASP.NET/SharePoint to reload a page. The big advantage of them they are designed to work with SharePoint and take all possible aspects of page life cycle into account. The javascript function to refresh a page is just called, guess..: **RefreshPage** and it resides in init.
Posts
Undvika postback i button
Äntligen har jag kommit på hur man kan skippa oönskad postback i button. Det finns många olika lösningar. Här är ett intressant inlägg på stackoverflow om det. Men det enklaste sättet är egentligen bara lägga till
return false; ```i onclick... Här är lösningen using System.Web.UI.HtmlControls; … HtmlButton HtmlButtonSendMail; protected override void CreateChildControls() { … #region Configure Send Email HtmlButtonSendMail = new HtmlButton(); HtmlButtonSendMail.InnerText = “Send Email”; HtmlButtonSendMail.ID = “HtmlButtonSendMail”; string script = “”; script += “SP.