Click here to Skip to main content
15,797,721 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
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
Updated 12-Oct-11 4:00am
[no name] 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 12-Oct-11 9:04am    
fine and sorry sir

function showMessage() {
        if (confirm('Are you sure?'))
            document.getElementById('<%= btnYesHidden.ClientID %>').click();
        else document.getElementById('<%= btnNoHidden.ClientID %>').click();
Share this answer
[no name] 12-Oct-11 13:03pm    
This has nothing at all to do with the question that was asked.
If you don't want a postback you could use PageMethod[^]
Share this answer
<script language="javascript">       
    function GetItem()
            //use this                            

           // we can use this also   
            __doPostBack('GetItemDetails', k);

in page load
string ctrlname = Request.Params.Get("__EVENTTARGET");
string value = Request.Params.Get("__EVENTARGUMENT");
Share this answer
puneetisonfire89 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 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
Zubair Alie 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.

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900