Results 1 to 5 of 5

Thread: ASP.NET MVC Custom controls

  1. #1
    Join Date
    Nov 2009
    Posts
    712

    ASP.NET MVC Custom controls

    Hello, I am making use of the ASP.net and I want to know the details of the Custom controls in Asp.net. I have search it on internet, But I am not able to know more about it. If you are having knowledge about it, then please tell me details about it. I have read books for it, but all of them are useless for it.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: ASP.NET MVC Custom controls

    Hello, I have got the code below which will create a control which can able to render the HTML label element:

    Code:
    public class Mvccheck : MvcControl
    {
        protected string ControlId
        {
            get { return Attributes["for"]; }
            private set { Attributes["for"] = value; }
        }
    
        protected string str
        {
            get { return InnerHtml; }
            private set { InnerHtml = value; }
        }
        public Mvccheck(string associatedControlID, string text): base("label")
        {
            ControlId = associatedControlID;
            str = text;
        }
    }

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: ASP.NET MVC Custom controls

    Hello, I don't have knowledge about the ASP.NET MVC Custom controls. But, I have got the code below which has implemented it. So, just make use of it.
    Code:
    using System.Web.Mvc;
    
    namespace SingingEels.Web.Mvc
    {
       public static class extension
       {
           public static string Marquee(this HtmlHelper htmlhelper, string msg)
           {
               return string.Format("<marquee>{0}</marquee>", msg);
           }
       }
    }

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: ASP.NET MVC Custom controls

    Hey, if you don't have knowledge about the ASP.NET MVC Custom controls then you need to use the code below which is the basic code into the ASP.NET MVC Custom controls and you can get how to use it in code.

    Code:
    namespace Esendex.CustomControls
    {
        public class Checking : System.Web.UI.WebControls.TextBox
        {
            // Add your all of the code here...........
        }
    }

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: ASP.NET MVC Custom controls

    Hello, I am not having knowledge about ASP.NET MVC Custom controls, but if you make use of the books below you will able to get solution as it is the high level books in asp.net:
    • The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks
    • Murach's ASP.NET 2.0 Web Programming with VB 2005
    • Build Your Own ASP.NET Website Using C# & VB.NET
    • Pro ASP.NET 2.0 in C# 2005

Similar Threads

  1. Replies: 8
    Last Post: 06-05-2012, 12:21 PM
  2. Replies: 9
    Last Post: 19-04-2012, 09:01 AM
  3. Custom controls for Interstellar Marines
    By Lanka Boy in forum Video Games
    Replies: 3
    Last Post: 11-01-2012, 07:42 PM
  4. Login controls in ASP.net
    By Jason Schwartzman in forum Software Development
    Replies: 4
    Last Post: 18-01-2011, 12:51 PM
  5. Parental controls for Mac OS X
    By quoip in forum Operating Systems
    Replies: 14
    Last Post: 11-11-2010, 11:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,219,791.91513 seconds with 17 queries