Jquery in the Master - Content and user control.
Hi,
I am trying to use jquery in the Master Content page which doesn't work for me.I am narrating a my specific issue. So here it is...
I have a Master Page:AdminMaster.master
I have Content Page:NewSession.aspx
I have a User Control: SessionControl.ascx
I have a another User Control : SessionRestriction.ascx
I am useing
SessionControl.ascx in my NewSession.aspx page. And SessionRestriction.ascx is used within the SessionControl.ascx. And when I should click A button on SessionControl.ascx only then SessionRestriction.ascx should appear.
I have pasted SessionRestriction.ascx within the div tag and making it disappear and click of button should make it appear. pasting some code here...
Master Page
<
head
runat
="server">
<
script
src
="~/JQuery/jquery-1.4.2.min.js")
type
="text/javascript"></
script
>
</head>
Content Page
<
asp:Content ID="Content1" ContentPlaceHolderID="MasterContent" Runat="Server">
<
script
src
="../JQuery/jquery-1.4.2.min.js"
type
="text/javascript"></
script
>
<
script
type
="text/javascript">
$(document).ready(
function
() {
$(
'#ViewSessionRestriction'
).hide();
$(
'Button#btnAddSessionRestriction'
).click(
function
()
{
alert(
'Before Show Calling'
);
$(
'#ViewSessionRestriction'
).show();
});
});
</
script
>
<
uc2
:
SessionControl
ID
="NewSessionControl"
runat
="server"
/>//SessionControl.ascx
</
asp
:
Content
>
And
SessionRestriction.ascx is already within the SessionControl.ascx