User Control:
Markup:
Code Behind:
Page:
Markup:
Code Behind:
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Monday, 28 April 2014
Tuesday, 11 June 2013
Add a print button for ReportViewer Reports in Google Chrome
Set up your report viewer as follows:
Labels:
ASP,
javascript,
Printing
Friday, 2 November 2012
How to close the browser window without a prompt
If you want to close the browser window in asp.net with javascript but dont want to prompt the user you can use the below code:
Labels:
ASP,
c#,
javascript
Tuesday, 7 February 2012
Friday, 16 December 2011
How to fire a non static code behind method from a javascript postback
I have found an interesting way of firing code behind methods from javascript functions without creating static web methods and ajax calls.
This in conjunction with an UpdatePanel produces a method that can be called from javascript that does not refresh the page.
If an update panel is used, then its a good idea to use the Id for a control inside the update panel so its marked for asyncrous postback, then differentiate between methods using the event argmument
to post back to the server using a javascript function the following code can be used:
We can then set the code behind to inspect the Request.Form collection for any postback information.
This can be very powerful as potentially any code behind method can be called!
This in conjunction with an UpdatePanel produces a method that can be called from javascript that does not refresh the page.
If an update panel is used, then its a good idea to use the Id for a control inside the update panel so its marked for asyncrous postback, then differentiate between methods using the event argmument
to post back to the server using a javascript function the following code can be used:
We can then set the code behind to inspect the Request.Form collection for any postback information.
This can be very powerful as potentially any code behind method can be called!
Labels:
ASP,
javascript,
Postback
Thursday, 18 August 2011
Dynamically create and show a jQuery UI dialog from Javascript
If you need to create a jQuery UI Dialog dynamically from javascript, heres how!
Labels:
javascript,
jQuery,
jQuery UI
Tuesday, 19 April 2011
Bring window to front with jQuery and Javascript
If you open a popup window via javascript it often appears behind the current page so the user may not notice it. A simple solution for this problem is to bring the window to the fron when it has finished loading. This can be achieved with a simple bit of jQuery and Javascript.
Labels:
javascript,
jQuery
Wednesday, 13 April 2011
Subscribe to:
Posts (Atom)