Click here to Skip to main content
15,889,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: hey expers , how to do a text bobx changed ? Pin
Mohammed Amine18-Jul-06 11:00
Mohammed Amine18-Jul-06 11:00 
AnswerRe: hey expers , how to do a text bobx changed ? Pin
Pradipta Basu19-Jul-06 2:25
Pradipta Basu19-Jul-06 2:25 
GeneralRe: hey expers , how to do a text bobx changed ? Pin
Mohammed Amine19-Jul-06 4:58
Mohammed Amine19-Jul-06 4:58 
AnswerRe: hey expers , how to do a text bobx changed ? Pin
Pradipta Basu20-Jul-06 4:58
Pradipta Basu20-Jul-06 4:58 
GeneralRe: hey expers , how to do a text bobx changed ? Pin
Pradipta Basu20-Jul-06 5:10
Pradipta Basu20-Jul-06 5:10 
Questionserver Pin
locaas18-Jul-06 1:08
locaas18-Jul-06 1:08 
AnswerRe: server Pin
StonePit18-Jul-06 4:04
StonePit18-Jul-06 4:04 
QuestionCustom Web user Control Pin
MalikRizwan18-Jul-06 0:53
MalikRizwan18-Jul-06 0:53 
I have a custom control with two properties and one overrided method render .. whenever i assign DataTable to one property i preserves it but when the render function is called its value is null
here is my code
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
namespace Nav<br />
{<br />
    /// <summary><br />
    /// Summary description for ucMenu<br />
    /// </summary><br />
    [ToolboxData("<{0}:ucMenu runat=server></{0}:ucMenu>")]<br />
    public class ucMenu : WebControl<br />
    {<br />
        DataTable _dtMenu; <br />
        string _id;<br />
        public ucMenu()<br />
        {<br />
            // <br />
            // TODO: Add constructor logic here<br />
            // <br />
            //_dsMenu = new DataSet();<br />
<br />
        }<br />
        public DataTable XMLDataSource<br />
        {<br />
            get<br />
            {<br />
                return (_dtMenu);<br />
            }<br />
            set<br />
            {<br />
                _dtMenu = value.Copy();<br />
            }<br />
            <br />
        }<br />
        public string  NavID<br />
        {<br />
            get<br />
            {<br />
                return (_id);<br />
            }<br />
            set<br />
            {<br />
                _id = value;<br />
            }<br />
<br />
        }<br />
        protected override void Render(HtmlTextWriter writer)<br />
        {<br />
            writer.Write("<ul id=" + _id + ">");<br />
            if (_dtMenu != null)<br />
            {<br />
                for (int i = 0; i < _dtMenu.Rows.Count; i++)<br />
                    {<br />
                        writer.Write("<li><a href=" + _dtMenu.Rows[i]["href"].ToString() + " >" + _dtMenu.Rows[i]["text"].ToString() + "</a></li>");<br />
                    }<br />
                <br />
            }<br />
            writer.Write("</ul>");<br />
            writer.Flush();<br />
            base.Render(writer);<br />
        <br />
        }<br />
    }<br />
}


IN HTML i m embedding it as
<MyBar:ucMenu ID="UcMenu1" runat="server" />
and in code behind
protected ucMenu MyBar = new ucMenu();
on top of class
can you please tell me why my datatable refernce to null in render even i have ref it to datatable from property

R A M


AnswerRe: Custom Web user Control Pin
minhpc_bk18-Jul-06 16:13
minhpc_bk18-Jul-06 16:13 
GeneralRe: Custom Web user Control Pin
MalikRizwan18-Jul-06 17:50
MalikRizwan18-Jul-06 17:50 
AnswerRe: Custom Web user Control Pin
minhpc_bk18-Jul-06 20:19
minhpc_bk18-Jul-06 20:19 
GeneralRe: Custom Web user Control Pin
MalikRizwan18-Jul-06 23:29
MalikRizwan18-Jul-06 23:29 
QuestionHow to bind data into textbox or label from database Pin
ypsyong18-Jul-06 0:13
ypsyong18-Jul-06 0:13 
AnswerRe: How to bind data into textbox or label from database Pin
Paddy Boyd18-Jul-06 0:19
Paddy Boyd18-Jul-06 0:19 
GeneralRe: How to bind data into textbox or label from database Pin
ypsyong18-Jul-06 0:59
ypsyong18-Jul-06 0:59 
QuestionHow to select record in using radio button in datagrid Pin
ypsyong18-Jul-06 0:10
ypsyong18-Jul-06 0:10 
AnswerRe: How to select record in using radio button in datagrid Pin
_AK_18-Jul-06 0:42
_AK_18-Jul-06 0:42 
GeneralRe: How to select record in using radio button in datagrid Pin
ypsyong18-Jul-06 0:57
ypsyong18-Jul-06 0:57 
AnswerRe: How to select record in using radio button in datagrid Pin
postmaster@programmingknowledge.com18-Jul-06 1:49
postmaster@programmingknowledge.com18-Jul-06 1:49 
QuestionFlash And ASP.net Pin
ADY00718-Jul-06 0:10
ADY00718-Jul-06 0:10 
Questionvalidation of textboxes in datagrid using javascript Pin
venkatasivaramaprasad17-Jul-06 23:53
venkatasivaramaprasad17-Jul-06 23:53 
AnswerRe: validation of textboxes in datagrid using javascript Pin
_AK_18-Jul-06 0:40
_AK_18-Jul-06 0:40 
GeneralRe: validation of textboxes in datagrid using javascript Pin
venkatasivaramaprasad18-Jul-06 0:59
venkatasivaramaprasad18-Jul-06 0:59 
GeneralRe: validation of textboxes in datagrid using javascript Pin
_AK_18-Jul-06 1:12
_AK_18-Jul-06 1:12 
GeneralRe: validation of textboxes in datagrid using javascript Pin
venkatasivaramaprasad18-Jul-06 1:16
venkatasivaramaprasad18-Jul-06 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.