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. Web User Control in Content page - Urgent; PLease help

Web User Control in Content page - Urgent; PLease help

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlsysadminquestion
4 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.
  • E Offline
    E Offline
    Ersan Ercek
    wrote on last edited by
    #1

    Dear All, I am adding an ascx file into a content page and always I receive an unknown element error. Somehow In content page eventhough I register the ascx file, the control seems to be not known or recognized. Why do you think it happens? Here is my html code - do I miss something? <%@ Page Language="C#" MasterPageFile="~/MAIN.Master" AutoEventWireup="true" CodeBehind="Urunler.aspx.cs" Inherits="cicektablo.Urunler" Title="flowerbox® Türkiye" %> <%@ Register src="WebMessageBox.ascx" tagname="WebMessageBox" tagprefix="uc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="body" runat="server"> <uc1:WebMessageBox ID="WebMessageBox1" runat="server" /> </asp:Content> ps: I also checked the msdn and it is explianed in excatly my way. I do not understand.

    T 1 Reply Last reply
    0
    • E Ersan Ercek

      Dear All, I am adding an ascx file into a content page and always I receive an unknown element error. Somehow In content page eventhough I register the ascx file, the control seems to be not known or recognized. Why do you think it happens? Here is my html code - do I miss something? <%@ Page Language="C#" MasterPageFile="~/MAIN.Master" AutoEventWireup="true" CodeBehind="Urunler.aspx.cs" Inherits="cicektablo.Urunler" Title="flowerbox® Türkiye" %> <%@ Register src="WebMessageBox.ascx" tagname="WebMessageBox" tagprefix="uc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="body" runat="server"> <uc1:WebMessageBox ID="WebMessageBox1" runat="server" /> </asp:Content> ps: I also checked the msdn and it is explianed in excatly my way. I do not understand.

      T Offline
      T Offline
      T M Gray
      wrote on last edited by
      #2

      If you need help with a specific error you should always give the exact text of the error message. Is the user control in the same folder as the page? Did you try adding the user control by dragging and dropping into the design of the page or did you add it manually through in the aspx?

      E 1 Reply Last reply
      0
      • T T M Gray

        If you need help with a specific error you should always give the exact text of the error message. Is the user control in the same folder as the page? Did you try adding the user control by dragging and dropping into the design of the page or did you add it manually through in the aspx?

        E Offline
        E Offline
        Ersan Ercek
        wrote on last edited by
        #3

        Thanks a lot for the answer it says webmessagebox(web user control) is not a known element... yes I tried dragging and dropping it... even so it gives the same error.

        T 1 Reply Last reply
        0
        • E Ersan Ercek

          Thanks a lot for the answer it says webmessagebox(web user control) is not a known element... yes I tried dragging and dropping it... even so it gives the same error.

          T Offline
          T Offline
          T M Gray
          wrote on last edited by
          #4

          Here are a few things to try in whatever order you choose: Make sure your control is in the same namespace as your pages or specify namespace in references. Under the Build menu, Clean Solution, then rebuild. Remove the control from the project completely, build, add it back and build again. Create a new project file and add the pages and controls into 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