Click here to Skip to main content
11,704,315 members (55,427 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hello friends,
I have a query in which i want to call method like button_click() or my own method like Save(); in aspx page
for eg
<Script language="javascript">{

can it is possible if yes then
give me a code as soon as possible

Thanks In Advance
Posted 12-Oct-11 2:47am
Edited 12-Oct-11 3:00am
Mark Nischalke at 12-Oct-11 8:55am
This is a volunteer site people will answer, or not, on their time. Don't ask for urgent or as soon as possible, it is very rude.
puneetisonfire89 at 12-Oct-11 9:04am
fine and sorry sir
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

If you don't want a postback you could use PageMethod[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

<script language="javascript">       
    function GetItem()
            //use this                            

in page load
string ctrlname = Request.Params.Get("__EVENTTARGET");
string value = Request.Params.Get("__EVENTARGUMENT");
puneetisonfire89 at 12-Oct-11 9:01am
fine bt sir i received a error msg Error 109 'RetailFrmBilln.CallGrid()' is inaccessible due to its protection level
puneetisonfire89 at 12-Oct-11 9:17am
Basically Sir I use Reset button to reset all Textboxes and gridview ..
so i want to remove grid in javascript
zaibshah at 12-Oct-11 9:48am
inaccessible due to protection level occurs when your method is set to private and you can't have access to it. make it protected instead of private.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

function showMessage() {
        if (confirm('Are you sure?'))
            document.getElementById('<%= btnYesHidden.ClientID %>').click();
        else document.getElementById('<%= btnNoHidden.ClientID %>').click();
Mark Nischalke at 12-Oct-11 13:03pm
This has nothing at all to do with the question that was asked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 740
1 OriginalGriff 495
2 Maciej Los 355
3 Andy Lanng 284
4 CPallini 267
0 OriginalGriff 8,824
1 Sergey Alexandrovich Kryukov 8,247
2 CPallini 5,197
3 Maciej Los 4,726
4 Mika Wendelius 3,606

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 29 May 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100