Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:17:55+00:00 2026-05-24T08:17:55+00:00

I have strong-type view, I want to create link that refers to Model, which

  • 0

I have strong-type view, I want to create link that refers to Model, which is strong-typed with that view, some property (e.g Model.property).
How can I do that?
I use net4.0.
when I write “> it do nothing.
Even visual studio don’t recognize it when I write < a href=”<%: and click ctrl+space it doesn’t bring anything.
This is my view

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<UrlParser.Models.Parse>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Show</title>
</head>
<body>
    <h1> Title: </h1>
    <%: Model.title %>
    <br />
    <h1> Description: </h1>
    <%: Model.description %>
    <% if(!Model.video.Equals("")) { %>
    <h2> Video:</h2>
    <%: Model.video %>
    <a href="<%: Model.video %>"> </a>
    <% } %>

</body>
</html>

I want my link refer to Model.video.

These is my controler:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UrlParser.Models;

namespace UrlParser.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        [HttpGet]
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Index(GetUrl getUrl)
        {
           // int i = 0;
            Parse prs = new Parse(getUrl.url);
            return View("Show", prs);
        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:17:56+00:00Added an answer on May 24, 2026 at 8:17 am

    Not sure i follow you 100% but it looks like you might have your view defined without your model like:

     <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
    

    And you will need something like this:

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MyViewModel>" %>
    

    The key above is the MyViewModel which is you view model. This should have all your properties; MyViewModel.Video.


    The following link was just missing the link text.

        <a href="<%: Model.video %>"> </a>
    

    when you added something in between the and the it made the link visible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple property on my view model that is of type string.
I have a strong type view of type List<List<MyViewModelClass>> The outer list will always
I have a method that returns a list of type string. I want to
I have a single view that handles a lot of Models of type VoyagesViewModel,
I have a view, that is of Inherits from System.Web.Mvc.ViewPage<P> . Type P has
I have an abstract generic view-model that I use as a base-class for several
I have string value and Type of some variable (For example int and 32
We know that string is a reference type , so we have string s=God
I have a bean of type string[] which has two or more values. I
My particular problem: I have a string which specifies an aribitrary type in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.