Solved

call a javascript function in the masterpage from the content page

Posted on 2010-09-02
1
322 Views
Last Modified: 2013-11-19
I have a javascipt function inside the master page.
1)  I  need to be able to call this function from the content page on a button click.
2) pass parameters to the function

How can i do the above 2. please help thanks
the javascript function is:
 function AddLink() {

         }    

I need to be able to call the above method from the button click in the content page:
<asp:Button ID="btnProduct" runat="server"  Text="Add Product()"
        style="margin-bottom: 0px"  />
0
Comment
Question by:TrialUser
1 Comment
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 33589819
include this javascript inside your master page, by using <script> tag, and then you can call its function. Did i missed anything?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question