tags:

views:

56

answers:

4

hi,, i m building a website in asp.net using c#.. can nyone tell me ..is it possible to either call a pageload function or load a page from javascript

+1  A: 

Use

window.location

Returns a Location object, which contains information about the URL of the document and provides methods for changing that URL. You can also assign to this property to load another URL.

rahul
actually i want to load the same page from javascript,,it means i have to give the url of that page only
sumit
A: 

Do you want to go to another page like from yourpage.com to example.com?

If yes, you can use location.href="http://example.com" in javascript.

S.Mark
A: 

you can call __dopostback javascript method:

__doPostBack('ControlId','');

http://aspalliance.com/895%5FUnderstanding%5Fthe%5FJavaScript%5F%5F%5FdoPostBack%5FFunction.all

Brij
A: 
window.location.reload()

And just for future reference, you could have found that in 10 seconds by Googling "javascript reload".

machineghost