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. MVC framework problem

MVC framework problem

Scheduled Pinned Locked Moved ASP.NET
asp-netdatabasecsharpsql-servervisual-studio
2 Posts 1 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.
  • H Offline
    H Offline
    Hellacious
    wrote on last edited by
    #1

    :confused:Hello all! I've been folowing Scott Guthries MVC Blog[^] and I'm having some issues getting it to work. I've implemented it using a SQL Server database, which is an asp.net roles/membership implementation with some other tables added in for Products, Categories etc. My problem is on the View page and the Code behind. When I place a asp:ListView control (with ID="categoryList") on the page (by code not dragging and dropping in the Design pane) and then switch to the code behind page, I get no IntelliSense type ahead on the ListView control to do the databinding. If I type the control name and binding lines, ie public void Page_Load() { categoryList.DataSource= ViewData; categoryList.DataBind(); } and attempt to build the project it tells me the categoryList control doesn't exist in the context. I've tried removing the Page_Load() section, building the project and then re-entering but to no effect. I'm sure it's going to be a silly mistake I've made. Any suggestions? Brian

    H 1 Reply Last reply
    0
    • H Hellacious

      :confused:Hello all! I've been folowing Scott Guthries MVC Blog[^] and I'm having some issues getting it to work. I've implemented it using a SQL Server database, which is an asp.net roles/membership implementation with some other tables added in for Products, Categories etc. My problem is on the View page and the Code behind. When I place a asp:ListView control (with ID="categoryList") on the page (by code not dragging and dropping in the Design pane) and then switch to the code behind page, I get no IntelliSense type ahead on the ListView control to do the databinding. If I type the control name and binding lines, ie public void Page_Load() { categoryList.DataSource= ViewData; categoryList.DataBind(); } and attempt to build the project it tells me the categoryList control doesn't exist in the context. I've tried removing the Page_Load() section, building the project and then re-entering but to no effect. I'm sure it's going to be a silly mistake I've made. Any suggestions? Brian

      H Offline
      H Offline
      Hellacious
      wrote on last edited by
      #2

      Well i found the problem, or at least a fix for it. Have got tons of other issues now of course! In the code behind I added protected System.Web.UI.WebControls.ListView categoryList; in the partial class and it fixed it.

      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