PostBack From javascript
-
i need to call a function that is codebehind file from javascript. i did it by placing button on page and setting its height and width 1 px and call it from javascript. but i have one issue that is a small button is displayed on the page even if i give it left position -100. can u plz help.
-
i need to call a function that is codebehind file from javascript. i did it by placing button on page and setting its height and width 1 px and call it from javascript. but i have one issue that is a small button is displayed on the page even if i give it left position -100. can u plz help.
Use __doPostBack in javascript. Google about it you'll lots of sample to understand. Please note Microsoft recommends to use GetPostBackEventReference instead of directly embedding __doPostBack, just google about it too.
Please don't forget to mark 'Good Answer', if you find it really a good one! Kashif
-
Use __doPostBack in javascript. Google about it you'll lots of sample to understand. Please note Microsoft recommends to use GetPostBackEventReference instead of directly embedding __doPostBack, just google about it too.
Please don't forget to mark 'Good Answer', if you find it really a good one! Kashif
im using __doPostBack but my problem with that is that i need to give id of a control. i want to call a code behind function that is not handler to any control. i can use a button as well but problem with that is it becomes visible to user. even if i set left position to -100px. can i call function that is given below, or make button invisible to user even then call its handler from javascript. private void Test() { label1.Text = "Hello"; }
-
i need to call a function that is codebehind file from javascript. i did it by placing button on page and setting its height and width 1 px and call it from javascript. but i have one issue that is a small button is displayed on the page even if i give it left position -100. can u plz help.
-
Try adding
style="display:none"
to the button. This may help you
Regards Aman Bhullar www.arlivesupport.com[^]
put a hidden button in your page lets say "btnHidden" Set its style="display:none;" call btnhidden.Click(); in javascript watever code written in btnHidden's event will be excuted.. Hope this wil help.
-
i need to call a function that is codebehind file from javascript. i did it by placing button on page and setting its height and width 1 px and call it from javascript. but i have one issue that is a small button is displayed on the page even if i give it left position -100. can u plz help.
put a hidden button in your page lets say "btnHidden" Set its style="display:none;" call btnhidden.Click(); in javascript watever code written in btnHidden's event will be excuted.. Hope this wil help...
-
put a hidden button in your page lets say "btnHidden" Set its style="display:none;" call btnhidden.Click(); in javascript watever code written in btnHidden's event will be excuted.. Hope this wil help...