Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Partial View Question

Partial View Question

Scheduled Pinned Locked Moved C#
asp-netquestionarchitecture
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • pkfoxP Offline
    pkfoxP Offline
    pkfox
    wrote on last edited by
    #1

    Hi all, I use a partial view in my net core MVC Web project ( personal project not work ) which receives a Model ViewButtonText

    public class ViewButtonText
    {
    public string ButtonText { get; set; }
    }

    and the partial view is

    @model Commands.Models.ViewButtonText

    All works as expected until I set ButtonText to a value which has a space in it e.g. "My Button" which results in the text on the button only showing the first word - any idea why guys ?

    "I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP

    M 1 Reply Last reply
    0
    • pkfoxP pkfox

      Hi all, I use a partial view in my net core MVC Web project ( personal project not work ) which receives a Model ViewButtonText

      public class ViewButtonText
      {
      public string ButtonText { get; set; }
      }

      and the partial view is

      @model Commands.Models.ViewButtonText

      All works as expected until I set ButtonText to a value which has a space in it e.g. "My Button" which results in the text on the button only showing the first word - any idea why guys ?

      "I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP

      M Offline
      M Offline
      Matthew Dennis
      wrote on last edited by
      #2

      @model Commands.Models.ViewButtonText

      "Time flies like an arrow. Fruit flies like a banana."

      pkfoxP 1 Reply Last reply
      0
      • M Matthew Dennis

        @model Commands.Models.ViewButtonText

        "Time flies like an arrow. Fruit flies like a banana."

        pkfoxP Offline
        pkfoxP Offline
        pkfox
        wrote on last edited by
        #3

        Thanks Matthew

        "I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups