Results 1 to 4 of 4

Thread: How to go to another view by clicking the label

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2013
    Posts
    12

    How to go to another view by clicking the label

    I am using asp.net with MVC architecture. I am designing a web page which displays the user's details in table format. I want to click the label and select the entire row and update the details. ie On clicking the label I want to go to another view. How could I do that?

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Re: How to go to another view by clicking the label

    Look up model binding. Visual Studio has built-in templates for View, Edit, Create etc. Try creating a new View and and in the "VIEW CONTENT" dropbox, select LIST. VS will generate a list of items with a link for EDIT. You can take this example and adapt it to your application.

  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to go to another view by clicking the label

    Hello shanida,

    Can you please post these questions in the MVC.Net Forum, as this is where they belong.

    I will move this one here as well.

    Gary

  4. #4
    New Member
    Join Date
    Nov 2013
    Location
    India
    Posts
    9

    Re: How to go to another view by clicking the label

    Quote Originally Posted by shanida View Post
    On clicking the label I want to go to another view. How could I do that?
    There may be multiple ways to achieve this any of following would help you:
    1. Create actionlink in MVC that would be efficient way (turn text-decoration:none would give a link, label like feel)
    2. Create label and bind click event on it via javascript. (Provide relative path to view eg. /controller/view or /view if working on same controller.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width