hi
call the javascript from code behind
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
// your code..
Dim script As String = "alert('something')"
If Not Page.ClientScript.IsStartUpScriptRegistered(Me.GetType(), "alertscript") Then
Page.ClientScript.RegisterStartUpScript(Me.GetType(), "alertscript", script, True)
End If
End Sub
using javascript:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script type="text/javascript">
var somefuntion = function () {
alert('some scripting');
document.getElementById('<%= btnHidden.ClientID %>').click();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:LinkButton ID="Button2" runat="server" OnClientClick="somefuntion()" Text="Button"
PostBackUrl="~/Gridpage.aspx" />
<asp:Button ID="btnHidden" runat="server" Style="display: none" Text="" OnClick="btnHidden_Click" />
</form>
</body>
</html>