1

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
  • I think you might want to add more detail to this question. Do you want to call the server side page load method? Or do you want to call a javascript method once the page has loaded in the browser? Commented Nov 23, 2009 at 14:02

4 Answers 4

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

actually i want to load the same page from javascript,,it means i have to give the url of that page only
0

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.

Comments

0

you can call __dopostback javascript method:

__doPostBack('ControlId',''); 

http://aspalliance.com/895_Understanding_the_JavaScript___doPostBack_Function.all

Comments

0
window.location.reload()

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.