Display partial view on click


Simple steps to add a Partial view on click of an html actionlink :

Step 1 : Right click on the “Shared” folder and select “Add -> View”.

Step 2 : Add the View name and Tick the option “Create as a Partial View”

1

Step 3 : Open the view where the partial view is to be rendered and add two divs. One div will contain the action link and the other will be where the Partial view is to be rendered.

1

Step 4 : Add a method named “LoadSamplePartial” to the Controller of the current view which returns the Partial View.

1

Step 5: The view is ready to be loaded. Run the application and click on the action link.

1

Advertisements

About Jasminder

.Net developer and blogger by profession, keen to learn new technologies, love nature, music and cricket.
This entry was posted in MVC & MVP. Bookmark the permalink.

I have a suggestion..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s