locked
unwanted   is generated at design time in custom control in vs2008 RRS feed

  • Question

  • User-1403331130 posted

    I am using VS2008, I used a custom control in my web application. It works fine on several machines but in few machines I have noticed that hundreds of of unwanted      are generating for each control. Can anybody help me, its urgent.

    Wednesday, January 20, 2010 1:01 AM

Answers

  • User162050988 posted

    It is a bug in visual studio 2008 beta 2. Read http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=293743#details for more details

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 20, 2010 1:09 AM

All replies

  • User162050988 posted

    It is a bug in visual studio 2008 beta 2. Read http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=293743#details for more details

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 20, 2010 1:09 AM
  • User-126244515 posted

    I have noticed that hundreds of of unwanted      are generating for each control.
     

    Is this instead of rendering the custom control, or...? What I'm getting at is whether the control renders the nbsp characters or not.

    Wednesday, January 20, 2010 1:10 AM
  • User-1403331130 posted

    no custom control doesn't render any  

    Wednesday, January 20, 2010 8:38 AM
  • User-126244515 posted

    Okay, but is the control rendered as well, or is it just the nbsp characters? Do you have some markup and potentially rendered output to show? 

    Wednesday, January 20, 2010 8:59 AM
  • User-1403331130 posted

    i send u some markup

     <cc1:CTextBox ID="txtBranchCode" runat="server" DataType="NumberType" 
                                IsValidate="True" MaxLength="5" ReadOnly="True" Width="50px">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </cc1:CTextBox>

     <cc1:CTextBox ID="txtBranchCode" runat="server" DataType="NumberType" 

                                IsValidate="True" MaxLength="5" ReadOnly="True" Width="50px">

                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                            </cc1:CTextBox>

    Thursday, January 21, 2010 11:49 PM
  • User-126244515 posted

    Ah, now I get it; I didn't read your message properly, sorry; it's at Design time you get the nbsp characters. I assume that those characters are not replacing anything else, i.e. if you remove them, you still have a fully functional user control, right? Does this happen when you drag the control on the Web Form, or when you open an existing Web Form containing the User Control?

    Friday, January 22, 2010 1:42 AM
  • User-16411453 posted

    So us your Render Sub, and the beginning of your OnInit or CreateChildControls

    Friday, January 22, 2010 8:03 PM
  • User569295445 posted

    make your custom function which will replace &nbsp; it


    Str.Replace("&nbsp;","")

    Saturday, January 23, 2010 9:05 AM
  • User-126244515 posted

    No offense, but how do you see that as a valid approach to dealing with the markup that has been generated incorrectly, and then only on some machines? The real issue here is to work out why it happens, not work around out and create extra work.

    Saturday, January 23, 2010 9:24 AM
  • User-16411453 posted

    I've seen it before back in 2005. It was from a poorly written control I wrote, in which the writer just started spitting out &nbsp; ramdomly.

    At the time, I didn't understand how server controls worked. My proble was in my RenderContents, in which I did not have one.


    Can't help you if you don't show us the code

    Sunday, January 24, 2010 5:36 PM
  • User-1403331130 posted

    if i change the property of any control in this page the automatically the &nbsp; is generated. 

    Sunday, January 24, 2010 11:26 PM
  • User-126244515 posted

    Can you show us the full markup for the page and possibly the code as well, please?

    Monday, January 25, 2010 12:43 AM
  • User1611391320 posted

    Code pls May be some unwanted spaces are being converted to &nbsp while rendering that

    Monday, January 25, 2010 2:09 AM
  • User-1403331130 posted

    Thank for replying, below is the Render event code, if you need the complete 
    one I can send it too, please let me know.
            protected override void RenderContents(HtmlTextWriter output)
            {
                output.Write(Text);
            }
            protected override void Render(System.Web.UI.HtmlTextWriter writer)
            {
                base.Render(writer);
            }
            protected override void AddAttributesToRender(HtmlTextWriter writer)
            {
                base.AddAttributesToRender(writer);
                string javascript = "";
                string ScriptDate = "";
                string javascript1 = "";
                string required = "";
                string KeyType = SetFocusMovement();
                if (IsValidate == true)
                {
                    if (DataType == DType.DateType)
                    {
                        ScriptDate = "return validateDate(this,event,'" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "','" + IsRequired + "');";
                    }
                    else if (DataType == DType.CharType)
                    {
                        javascript1 = "return CheckNumbers(this,'char',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                    }
                    else if (DataType == DType.VarCharType)
                    {
                        javascript1 = "return CheckNumbers(this,'varchar',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                    }
                    else if (DataType == DType.NumberType)
                    {
                        if (DecimalPlace == DPlace.None)
                        {
                            javascript1 = "return CheckNumbers(this,'num',event,'Zero', '" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                        }
                        else if (DecimalPlace == DPlace.Three)
                        {
                            javascript1 = "return CheckNumbers(this,'num',event,'Three','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                        }
                        else if (DecimalPlace == DPlace.One)
                        {
                            javascript1 = "return CheckNumbers(this,'num',event,'One','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                        }
                        else if (DecimalPlace == DPlace.Two)
                        {
                            javascript1 = "return CheckNumbers(this,'num',event,'Two','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                        }
                        else if (DecimalPlace == DPlace.Four)
                        {
                            javascript1 = "return CheckNumbers(this,'num',event,'Four','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                        }
                    }
                    else if (DataType == DType.PANType)
                    {
                        javascript1 = "return CheckNumbers(this,'pan',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                    }
                    else if (DataType == DType.IPType)
                    {
                        javascript1 = "return CheckNumbers(this,'ip',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";
                    }
                }
                else
                {
                    javascript1 = "return IsValidateFalse(this,'" + KeyType + "');";
                }
                StringBuilder sb = new StringBuilder();
                if (this.AutoPostBack == true)
                {
                    if (PostBackOnTextNotChanged == true)
                    {
                        javascript = javascript + "PostBack(" + controlID + ",event);";
                        this.Text = this.Text.Trim ();
                    }
                }
                if (IsRequired == true)
                {
                    required = "return IsRequired(this,event,'" + KeyType + "','True','" + NextControlID + "','" + PreviousControlID + "'); ";
                }
                else
                {
                    required = "return IsRequired(this,event,'" + KeyType + "','False','" + NextControlID + "','" + PreviousControlID + "'); ";
                }
                if (IsValidate == true)
                {
                   if (DataType == DType.DateType)
                    {
                    }
                   else if (DataType == DType.PANType )
                    {
                        javascript = javascript + "Val_Num('" + Convert.ToInt64 (MinVal) + "','" + Convert.ToInt64 (MaxVal) + "'," + controlID + ",'" + DataType + "');";
                    }
                }
                else
                {
                    required = "return IsValidateFalse(this,'" + KeyType + "');";
                }
                string HelpScript = "";
                string HelpPassingScript = "";
               
                HelpScript = " HelpMaster(this.value,event,this,'" + HelpParameter + "','" + HelpParameter1 + "','" + HelpParameter2 + "','" + HelpParameter3 + "','" + HelpParameter4 + "','" + HelpPage + "','" + HelpOptionalParameter + "','" + HelpPageLeft + "','" + HelpPageRight + "','" + HelpPageTop + "','" + HelpPageHeight + "','" + HelpPageWidth + "','" + RequiredPostback + "','" + RequiredDescription + "','" + this.ClientID + "'); ";
                HelpPassingScript = " HelpPassingMaster(this.value,event,this,'" + HelpPgPassParameter + "','" + HelpPgPassingP1 + "','" + HelpPgPassingP2 + "','" + HelpPgPassingP3 + "','" + HelpPgPassingP4 + "','" + HelpPgPassing + "','" + HelpOptionalParameter + "','" + HelpPageLeft + "','" + HelpPageRight + "','" + HelpPageTop + "','" + HelpPageHeight + "','" + HelpPageWidth + "','" + RequiredPostback + "','" + RequiredDescription + "','" + this.ClientID + "'); ";
                string AllScriptFunction = "";
                if (DataType == DType.None)
                {
                    AllScriptFunction = HelpScript + HelpPassingScript + required;
                }
                else
                {
                    AllScriptFunction = HelpScript + HelpPassingScript + javascript1;
                }
                string Calls = "";
                string ScriptString = "";
                if (!string.IsNullOrEmpty(ScriptFunction))
                {
                    ScriptString = ScriptFunction + ";";
                }
                writer.AddAttribute("onblur", "lostFocus(this);" + Calls + ScriptDate + ScriptString);
                writer.AddAttribute("onFocus", "getFocus(this);");
                
            }
            protected override void OnTextChanged(System.EventArgs e)
            {
                base.OnTextChanged(e);
                this.Text = this.Text.Trim() ;
            }
            protected override void OnPreRender(System.EventArgs e)
            {
               base.OnPreRender(e);
               string resourceFilePath = "RControl.Resources.CTextBox.js";
               this.Page.ClientScript.RegisterClientScriptInclude("CTextBoxScript", this.Page.ClientScript.GetWebResourceUrl(typeof(CTextBox), resourceFilePath));
               
            }
    Thanks & Regards
    kunal

    Thank for replying, below is the Render event code, if you need the complete 

    one I can send it too, please let me know.


            protected override void RenderContents(HtmlTextWriter output)

            {

                output.Write(Text);

            }

            protected override void Render(System.Web.UI.HtmlTextWriter writer)

            {

                base.Render(writer);

            }

            protected override void AddAttributesToRender(HtmlTextWriter writer)

            {


                base.AddAttributesToRender(writer);

                string javascript = "";

                string ScriptDate = "";

                string javascript1 = "";

                string required = "";

                string KeyType = SetFocusMovement();

                if (IsValidate == true)

                {

                    if (DataType == DType.DateType)

                    {

                        ScriptDate = "return validateDate(this,event,'" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "','" + IsRequired + "');";

                    }

                    else if (DataType == DType.CharType)

                    {

                        javascript1 = "return CheckNumbers(this,'char',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                    }

                    else if (DataType == DType.VarCharType)

                    {

                        javascript1 = "return CheckNumbers(this,'varchar',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                    }

                    else if (DataType == DType.NumberType)

                    {

                        if (DecimalPlace == DPlace.None)

                        {

                            javascript1 = "return CheckNumbers(this,'num',event,'Zero', '" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                        }

                        else if (DecimalPlace == DPlace.Three)

                        {

                            javascript1 = "return CheckNumbers(this,'num',event,'Three','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                        }

                        else if (DecimalPlace == DPlace.One)

                        {

                            javascript1 = "return CheckNumbers(this,'num',event,'One','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                        }

                        else if (DecimalPlace == DPlace.Two)

                        {

                            javascript1 = "return CheckNumbers(this,'num',event,'Two','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                        }

                        else if (DecimalPlace == DPlace.Four)

                        {

                            javascript1 = "return CheckNumbers(this,'num',event,'Four','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                        }

                    }

                    else if (DataType == DType.PANType)

                    {

                        javascript1 = "return CheckNumbers(this,'pan',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                    }

                    else if (DataType == DType.IPType)

                    {

                        javascript1 = "return CheckNumbers(this,'ip',event,'Zero','" + IsRequired + "','" + KeyType + "','" + NextControlID + "','" + PreviousControlID + "');";

                    }

                }

                else

                {

                    javascript1 = "return IsValidateFalse(this,'" + KeyType + "');";

                }


                StringBuilder sb = new StringBuilder();


                if (this.AutoPostBack == true)

                {

                    if (PostBackOnTextNotChanged == true)

                    {


                        javascript = javascript + "PostBack(" + controlID + ",event);";

                        this.Text = this.Text.Trim ();

                    }

                }


                if (IsRequired == true)

                {

                    required = "return IsRequired(this,event,'" + KeyType + "','True','" + NextControlID + "','" + PreviousControlID + "'); ";

                }

                else

                {

                    required = "return IsRequired(this,event,'" + KeyType + "','False','" + NextControlID + "','" + PreviousControlID + "'); ";

                }

                if (IsValidate == true)

                {

                   if (DataType == DType.DateType)

                    {

                    }

                   else if (DataType == DType.PANType )

                    {

                        javascript = javascript + "Val_Num('" + Convert.ToInt64 (MinVal) + "','" + Convert.ToInt64 (MaxVal) + "'," + controlID + ",'" + DataType + "');";

                    }

                }

                else

                {

                    required = "return IsValidateFalse(this,'" + KeyType + "');";

                }


                string HelpScript = "";

                string HelpPassingScript = "";

               

                HelpScript = " HelpMaster(this.value,event,this,'" + HelpParameter + "','" + HelpParameter1 + "','" + HelpParameter2 + "','" + HelpParameter3 + "','" + HelpParameter4 + "','" + HelpPage + "','" + HelpOptionalParameter + "','" + HelpPageLeft + "','" + HelpPageRight + "','" + HelpPageTop + "','" + HelpPageHeight + "','" + HelpPageWidth + "','" + RequiredPostback + "','" + RequiredDescription + "','" + this.ClientID + "'); ";

                HelpPassingScript = " HelpPassingMaster(this.value,event,this,'" + HelpPgPassParameter + "','" + HelpPgPassingP1 + "','" + HelpPgPassingP2 + "','" + HelpPgPassingP3 + "','" + HelpPgPassingP4 + "','" + HelpPgPassing + "','" + HelpOptionalParameter + "','" + HelpPageLeft + "','" + HelpPageRight + "','" + HelpPageTop + "','" + HelpPageHeight + "','" + HelpPageWidth + "','" + RequiredPostback + "','" + RequiredDescription + "','" + this.ClientID + "'); ";


                string AllScriptFunction = "";


                if (DataType == DType.None)

                {

                    AllScriptFunction = HelpScript + HelpPassingScript + required;

                }

                else

                {

                    AllScriptFunction = HelpScript + HelpPassingScript + javascript1;

                }


                string Calls = "";

                string ScriptString = "";

                if (!string.IsNullOrEmpty(ScriptFunction))

                {

                    ScriptString = ScriptFunction + ";";

                }

                writer.AddAttribute("onblur", "lostFocus(this);" + Calls + ScriptDate + ScriptString);

                writer.AddAttribute("onFocus", "getFocus(this);");

                

            }

            protected override void OnTextChanged(System.EventArgs e)

            {

                base.OnTextChanged(e);

                this.Text = this.Text.Trim() ;

            }

            protected override void OnPreRender(System.EventArgs e)

            {

               base.OnPreRender(e);

               string resourceFilePath = "RControl.Resources.CTextBox.js";

               this.Page.ClientScript.RegisterClientScriptInclude("CTextBoxScript", this.Page.ClientScript.GetWebResourceUrl(typeof(CTextBox), resourceFilePath));

               

            }




    Thanks & Regards

    kunal

    Monday, January 25, 2010 4:16 AM
  • User-1403331130 posted

    i send code for custom control

    plz help me

    thanks



    Friday, January 29, 2010 12:42 AM
  • User-126244515 posted

    I've gone over the code and I didn't find anything, so if you could send me the full code for the custom control, I can try and reproduce it here. Feel free to use my private e-mail address, from my profile, if you like. :-)

    Friday, January 29, 2010 10:42 AM
  • User-1403331130 posted

    script code i send u code of custom control and javascript code on your mail id


    plz check the code


    thank you

    Saturday, January 30, 2010 4:53 AM
  • User-126244515 posted

    I can't reproduce the error here, I'm afraid. On the machines where you get the error, is it the same project or a different project?

    Not that it should make a difference, but better check it; in which type of projects (WSP or WAP) does it fail, and is it a standard Web Form or a content page or master page? Can you show us the markup for a Web Form,  with which you have the issue, please?

    Saturday, January 30, 2010 10:36 AM
  • User-1403331130 posted

    Below is markup code where i got unwanted &nbsp;


    Thanks and Regards

     Krunal



    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AddressDetailOther.aspx.cs" Inherits="AddressDetailOther" Title="Address Details Page" %>

    <%@ Register Assembly="RControl" Namespace="RControl" TagPrefix="cc1" %>

    <asp:Content ID="Content2" ContentPlaceHolderID="ctp" Runat="Server">

        <asp:UpdatePanel ID="pnlAddressMaster" runat="server">

    <ContentTemplate>

    <table onkeydown="closeWin();" style="width:68%">

    <tr>

    <th colspan="4">

         <asp:Label ID="lblPageTitle" runat="server"

              Text="Address Details" Width="285px"></asp:Label>

        </th>

    </tr>

    <tr>

        <td style="text-align:right; width:13%">

            <asp:Label ID="lblAddressMstId" runat="server" Text="Address ID"></asp:Label>

        </td>

    <td colspan="3">

     

        <cc1:CTextBox ID="txtAddressId" runat="server" AutoPostBack="True"

            DataType="NumberType" HelpPage="" HelpPageHeight="" HelpPageLeft=""

            HelpPageRight="" HelpPageTop="" HelpPageWidth="" HelpParameter=""

            IsRequired="False" IsValidate="True" MaxLength="10" Width="150px"

            ontextchanged="txtAddressId_TextChanged"></cc1:CTextBox>

    </td>

    </tr>

        <tr>

            <td style="text-align:right">

               <span>*</span> <asp:Label ID="lblAddress" runat="server" Text="Address "></asp:Label>

            </td>

            <td colspan="3">

                <cc1:CTextBox ID="txtAddress" runat="server" DataType="VarCharType" style="text-transform:uppercase"

                    IsRequired="True" IsValidate="True" MaxLength="120" TextMode="MultiLine"

                    Width="409px"></cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right; width:20%">

                <asp:Label ID="lblAddressOL" runat="server" Text="Address In Other Language"></asp:Label>

            </td>

            <td colspan="3">

                <cc1:CTextBox ID="txtAddressOL" runat="server" DataType="VarCharType"   style="text-transform:uppercase"

                    IsRequired="False" IsValidate="True" MaxLength="120" TextMode="MultiLine"

                    Width="409px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </cc1:CTextBox>

            </td>

        </tr>

     

     

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblPinCode" runat="server" Text="Pin Code"></asp:Label>

            </td>

            <td colspan="3">

                <cc1:CTextBox ID="txtPinCode" runat="server"

                    DataType="NumberType" IsRequired="False" IsValidate="True" MaxLength="10"

                    Width="150px" DecimalPlace="None" Height="14px"></cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblCity" runat="server" Text="City"></asp:Label>

            </td>

            <td>

                <cc1:CTextBox ID="txtCity" runat="server"  style="text-transform:uppercase"

                    DataType="VarCharType" DecimalPlace="None" Height="14px" IsRequired="True"

                    IsValidate="True" MaxLength="50" Width="150px"></cc1:CTextBox>

            </td>

            <td style="text-align:right" class="style1">

                <asp:Label ID="lblTahasil" runat="server" Text="Tahasil"></asp:Label>

            </td>

            <td >

                <cc1:CTextBox ID="txtTahasil" runat="server" DataType="VarCharType"

                    Height="14px" IsRequired="False" IsValidate="True" MaxLength="50"

                    style="text-transform:uppercase" Width="154px">

                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                </cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblDistrict" runat="server" Text="District"></asp:Label>

            </td>

            <td colspan="3">

                <cc1:CTextBox ID="txtDistrict" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="50"

                    style="text-transform:uppercase" Width="150px">

                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                </cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblState" runat="server" Text="State"></asp:Label>

            </td>

            <td>

                <cc1:CTextBox ID="txtState" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="50"

                    style="text-transform:uppercase" Width="150px">

                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                </cc1:CTextBox>

            </td>

            <td style="text-align:right" class="style1">

                <asp:Label ID="lblCountry" runat="server" Text="Country"></asp:Label>

            </td>

            <td>

                <cc1:CTextBox ID="txtCountry" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="14"

                    style="text-transform:uppercase" Width="154px">

     

                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

     

                </cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblPhoneNo1" runat="server" Text="Phone No. 1"></asp:Label>

            </td>

            <td 11%;">

                <cc1:CTextBox ID="txtPhoneNo1" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="14" Width="150px">      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      </cc1:CTextBox>

            </td>

            <td style="text-align:right;" class="style1">

                <asp:Label ID="lblPhoneNo2" runat="server" Text="Phone No. 2"></asp:Label>

            </td>

            <td >

                <cc1:CTextBox ID="txtPhoneNo2" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="14" Width="154px"

                    Height="14px">  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblPhoneNo3" runat="server" Text="Phone No. 3  "></asp:Label>

            </td>

            <td 11%;"="" colspan="3">

                <cc1:CTextBox ID="txtPhoneNo3" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="14" Width="150px">

                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                </cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblFaxNo3" runat="server" Text="Email ID" Width="55px"></asp:Label>

            </td>

            <td colspan="3">

                <asp:TextBox ID="txtEmail" runat="server" MaxLength="120" Width="406px"

                    CausesValidation="True"  ></asp:TextBox>

                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"

                    ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="Invalid Email Id"

                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>

             </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblFaxNo1" runat="server" Text="Fax No. 1" Width="55px"></asp:Label>

            </td>

            <td>

                <cc1:CTextBox ID="txtFaxNo1" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="20" Width="150px">  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </cc1:CTextBox>

            </td>

            <td  style="text-align:right" class="style1">

                <asp:Label ID="lblFaxNo2" runat="server" Text="Fax No. 2"></asp:Label>

            </td>

            <td >

                <cc1:CTextBox ID="txtFaxNo2" runat="server" DataType="VarCharType"

                    IsRequired="False" IsValidate="True" MaxLength="20" Width="154px">  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </cc1:CTextBox>

            </td>

        </tr>

        <tr>

            <td style="text-align:right">

                <asp:Label ID="lblStatus" runat="server" Text="Status" Width="55px"></asp:Label>

            </td>

            <td colspan="3">

                <asp:DropDownList ID="ddlStatus" runat="server" CssClass="inputcombo"

                    Height="16px" Width="149px">

                    <asp:ListItem Value="A">ACTIVE</asp:ListItem>

                    <asp:ListItem Value="O">OLD</asp:ListItem>

                    <asp:ListItem Value="C">CANCELED</asp:ListItem>

                </asp:DropDownList>

            </td>

        </tr>

        <tr>

            <td style="text-align:right" colspan="4">

                <asp:Button ID="btnSave" runat="server" CssClass="button"

                    onclick="btnSave_Click" Text="Save" />

                <asp:Button ID="btnCancel" runat="server" CssClass="button"

                    onclick="btnCancel_Click" Text="Clear" />

            </td>

        </tr>

    </table>

    </ContentTemplate>

    </asp:UpdatePanel>

    </asp:Content>

     

    <asp:Content ID="Content3" runat="server" contentplaceholderid="head">

        <style type="text/css">

     

        .style2

        {

            width: 20%;

        }

    </style>

     

     

     

     

    </asp:Content>

     

     

    Monday, February 1, 2010 3:55 AM
  • User-126244515 posted

    I am sorry, but I am just not able to recreate the issue; it works just fine. Have you been able to find differences between the machines that have the issue and those that don't? Did you check the reported issue, posted by one of the other posters? 

    Monday, February 1, 2010 9:02 AM
  • User-16411453 posted

    To Render it's

    protected override void Render(System.Web.UI.HtmlTextWriter writer)

            {

                RenderContents(writer);

            }

    That's why you get the extra spaces &nbsp;

    Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

            If Not Me.Context Is Nothing Then
                RenderContents(writer)
            Else
                RenderDesignMode(writer)
            End If

        End Sub
        Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
            MyBase.OnInit(e)

            Controls.Clear()

           'Runtime Control

       End Sub

    Private Sub RenderDesignMode(ByVal writer As HtmlTextWriter)

            Controls.Clear()

           'Design time Control

    End Sub

    Tuesday, February 2, 2010 7:12 PM
  • User-1403331130 posted

    Sorry for responding late, I tried it and found that VS2008 is not allowing me to do anything in design mode, I changed the code to make it work, but didnt got anything. 

    Thanks 

    Kunal Gote


    Tuesday, February 9, 2010 1:05 AM
  • User-16411453 posted

    If you want to do stuff in design mode, you have to fork out render, so one copy is runtime, and another is design mode. Not everything works in design mode, its for design purposes only.

    Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

            If Not Me.Context Is Nothing Then
                RenderContents(writer)
            Else
                RenderDesignMode(writer)
            End If

        End Sub

    RenderContents is the run time mode, make another copy of oninit, and call it RenderDesignMode

    Private Sub RenderDesignMode(ByVal writer As HtmlTextWriter)

            Controls.Clear()

            Dim cs As ClientScriptManager = Me.Page.ClientScript
            Dim rsType As Type = Me.GetType()

    End Sub

    Tuesday, February 9, 2010 1:36 AM