How to add javascript in Asp.Net code behind?

On_PageLoad evnt,
add the below code..
button1.Attributes.Add("OnClick", "javascript:alert('our message')");

Comments

  1. You have restriction on conditional alert, for that you can click on the next blog..

    ReplyDelete

Post a Comment

Popular posts from this blog

Performance Optimization in Sitecore

Strategies for Migrating to Sitecore from legacy or upgrading from older Sitecore

Azure Event Grid Sample code