2

Previously in aspx we have

protected void Page_Load(object sender, EventArgs e)
{
}

function which handled all page load events. But I do not know how this can be used in MVC. Can someone please help !!!

1 Answer 1

3

ASP.NET MVC doesn't work on events like ASP.Net. There is no PageLoad Event. Your controller action methods correspond to requests or view sent to the server. You need to build the equivalent control in HTML, and then use a FORM to HttpPost the data to the server, where it is handled by a controller method. Similarly HttpGet is used to get data using controller method.

I suggest you this link to get started with MVC

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

1 Comment

Actually i have a list which is updated every time when the page is refresh,

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.