I am trying to create a simple WebControl. Here is my WebControl class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
namespace Learn_092312.App_Code
{
public class FullyRenderedWebControl : WebControl
{
private string _Text;
public string Text
{
get { return _Text; }
set { _Text = value; }
}
protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
{
writer.Write(_Text);
}
}
}
Here is my mark-up:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test_FullyRenderedWebControl.aspx.cs" Inherits="Learn_092312.Test_FullyRenderedWebControl" %>
<%@ Register TagPrefix="custom" Namespace="Learn_092312.App_Code" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...
Go to the complete details ...