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. Server Control help? Code attached

Server Control help? Code attached

Scheduled Pinned Locked Moved ASP.NET
csharphtmlsysadminhelpquestion
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.
  • W Offline
    W Offline
    windhopper
    wrote on last edited by
    #1

    I'm trying to create a basic server control to display and image but i keep getting errors. The control code below compiles fine but when i try to add it to a page it gives me errors. Can anyone help? Control code: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="testControl.ascx.cs" Inherits="_Default"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <img src="booze.jpg" runat="server" id="image" /> <br /> Code used in page/web form: <%@ Register TagPrefix="apress" TagName="image" Src="testControl.ascx" %> <apress:image id="image1" runat="server"></apress:image> I've added the control .dll to the project and everything but i still get errors. Help???

    A 1 Reply Last reply
    0
    • W windhopper

      I'm trying to create a basic server control to display and image but i keep getting errors. The control code below compiles fine but when i try to add it to a page it gives me errors. Can anyone help? Control code: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="testControl.ascx.cs" Inherits="_Default"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <img src="booze.jpg" runat="server" id="image" /> <br /> Code used in page/web form: <%@ Register TagPrefix="apress" TagName="image" Src="testControl.ascx" %> <apress:image id="image1" runat="server"></apress:image> I've added the control .dll to the project and everything but i still get errors. Help???

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      windhopper wrote:

      I've added the control .dll to the project

      why? i think you are trying to create a UserControl , then why dll ?

      Best Regards ----------------- Abhijit Jana Check Out My Latest Article Java.NET : Integration of Java and .NET[^] "Success is Journey it's not a destination"

      W 1 Reply Last reply
      0
      • A Abhijit Jana

        windhopper wrote:

        I've added the control .dll to the project

        why? i think you are trying to create a UserControl , then why dll ?

        Best Regards ----------------- Abhijit Jana Check Out My Latest Article Java.NET : Integration of Java and .NET[^] "Success is Journey it's not a destination"

        W Offline
        W Offline
        windhopper
        wrote on last edited by
        #3

        Yes i am trying to create a user control but i keep getting errors when i add the control like i described so i've tried with the control .dll and without and still get errors so i'm looking for suggestions as to what else i can try? Is there something wrong with my code even though it compiles?

        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