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. Web Development
  3. ASP.NET
  4. View and textbox

View and textbox

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlasp-netsysadmin
2 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.
  • F Offline
    F Offline
    future3839
    wrote on last edited by
    #1

    Hey, I write an view and when I try to run my page, running with error. its my code

    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    InsertUpdatePerson
    </asp:Content>

    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>InsertUpdatePerson</h2>
    <div id = "leftside">
        <%using (Html.BeginForm())
          { %>
            <div>
                <fieldset>
                    <div class="editor-label">
                        <label for= "Fname">FirstName:</label>
                    </div>
                    <div class="editor-field-textbox">
                        <!--textboxname,value,create attribute for textbox!-->
                        <%Html.TextBox("Fname",null, new{@class= "Form\_TextBox"})%>                        
                    </div>
                    
                    <div class="editor-label">
                        <label for="Sname">LastName:</label>
                    </div>
                    <div class= "editor-field-textbox">
                        <%Html.TextBox("Sname",null, new{@class= "Form\_TextBox"})%>
                    </div>
                    
                    <div class="editor-label">
                        <label for= "Gender">Gender:</label>
                    </div>
                    <div class="editor-field-textbox">
                        <!--textboxname,value,create attribute for textbox!-->
                        <%Html.DropDownList()%>
                    </div>
                    
                    
                </fieldset>
            </div>            
          <%} %>
    </div>
    

    </asp:Content>

    and its the error

    Line 18:

    Line 19:
    Line 20: <%Html.TextBox("Fname",null, new{@class= "Form_TextBox"})%>
    Line 21:

    Line 22:

    Error is line 20 I am just following an sample job.what could be the problem?

    L 1 Reply Last reply
    0
    • F future3839

      Hey, I write an view and when I try to run my page, running with error. its my code

      <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

      <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
      InsertUpdatePerson
      </asp:Content>

      <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

      <h2>InsertUpdatePerson</h2>
      <div id = "leftside">
          <%using (Html.BeginForm())
            { %>
              <div>
                  <fieldset>
                      <div class="editor-label">
                          <label for= "Fname">FirstName:</label>
                      </div>
                      <div class="editor-field-textbox">
                          <!--textboxname,value,create attribute for textbox!-->
                          <%Html.TextBox("Fname",null, new{@class= "Form\_TextBox"})%>                        
                      </div>
                      
                      <div class="editor-label">
                          <label for="Sname">LastName:</label>
                      </div>
                      <div class= "editor-field-textbox">
                          <%Html.TextBox("Sname",null, new{@class= "Form\_TextBox"})%>
                      </div>
                      
                      <div class="editor-label">
                          <label for= "Gender">Gender:</label>
                      </div>
                      <div class="editor-field-textbox">
                          <!--textboxname,value,create attribute for textbox!-->
                          <%Html.DropDownList()%>
                      </div>
                      
                      
                  </fieldset>
              </div>            
            <%} %>
      </div>
      

      </asp:Content>

      and its the error

      Line 18:

      Line 19:
      Line 20: <%Html.TextBox("Fname",null, new{@class= "Form_TextBox"})%>
      Line 21:

      Line 22:

      Error is line 20 I am just following an sample job.what could be the problem?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      future3839 wrote:

      what could be the problem?

      What did the error-message say? Have you googled that message? :)

      I are Troll :suss:

      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