Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

call javascrip from master page's content

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ganesh - 02 Aug 2007 19:03 GMT
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>
clintonG - 02 Aug 2007 19:54 GMT
Put the script into the content page itself or better yet use the Master
page to link to an external file that contains your script.

<%= Clinton Gallagher
        NET csgallagher AT metromilwaukee.com
        URL http://clintongallagher.metromilwaukee.com/

> How to call javascript in a asp.net master's content page, i tried
> something like this but it's not working.
[quoted text clipped - 21 lines]
> </div>
> </asp:content>

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.