G
Ganesh
How to call javascript in a asp.net master's content page, i tried something
like this but it's not working.
<%@ Page Language="C#" MasterPageFile="~/Default.master"
AutoEventWireup="true" CodeBehind="RegisterUser.aspx.cs"
Inherits="MySpace.RegisterUser" %>
<asp:content id="Content1" contentplaceholderid="Main" runat="server">
<script language="JavaScript" src=".\JavaScript\common.js"
type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
function IsOkToPost1()
{
alert('asdfadsf');
}
<script>
<div>
<asp:Button ID="Button1" runat="server"
OnClientClick="javascript:IsOkToPost1()" Text="Button" />
</div>
</asp:content>
like this but it's not working.
<%@ Page Language="C#" MasterPageFile="~/Default.master"
AutoEventWireup="true" CodeBehind="RegisterUser.aspx.cs"
Inherits="MySpace.RegisterUser" %>
<asp:content id="Content1" contentplaceholderid="Main" runat="server">
<script language="JavaScript" src=".\JavaScript\common.js"
type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
function IsOkToPost1()
{
alert('asdfadsf');
}
<script>
<div>
<asp:Button ID="Button1" runat="server"
OnClientClick="javascript:IsOkToPost1()" Text="Button" />
</div>
</asp:content>