TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
User007
NA
2
12.4k
How to call c# method from javascript function
May 22 2017 8:36 AM
In my application I need to call aspx.cs method from javascript function call.
I tried this one in
<img id='img2' width="9px" border="0" src="plus.gif" onclick="MyHeader()"/> Header <div>
<asp:GridView ID="GrdHeader" runat="server" AutoGenerateColumns="false">
<Columns>
</Columns>
</asp:GridView></div>
My Javascript Function:
function MyHeader() {
PageMethods.BindHeaderGrid();
}
My code behined method:
[WebMethod]
public void BindHeaderGrid()
{
GrdHeader.DataSource = ds.Tables[0];
GrdHeader.DataBind();
}
But it is not call this function.
Reply
Answers (
2
)
How to pass query string from master page to content page?
how to restart app pool without modify the web.config file f