Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2007, 05:45 PM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

and here is my code of web form when i add this control to the web form.

<%@ Register TagPrefix="cc1" Namespace="DropDownWebControl" Assembly="DropDownWebControl" %>
<cc1:SmartDropDown id="SmartDropDown1" style="Z-INDEX: 103; LEFT: 187px; POSITION: absolute; TOP: 259px"
                runat="server" AutoPostBack="True" OnSelectedIndexChanged="SmartDropDown1_SelectedInd exChanged"
                Width="109px">
                <asp:ListItem value="custom">custom</asp:ListItem>
                <asp:ListItem Value="abc">abc</asp:ListItem>
                <asp:ListItem Value="ade">ade</asp:ListItem>
                <asp:ListItem Value="bad">bad</asp:ListItem>
                <asp:ListItem Value="bcd">bcd</asp:ListItem>
            </cc1:SmartDropDown>

and in aspx.cs page ,i have

protected void SmartDropDown1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            TextBox1.Text=SmartDropDown1.SelectedValue;
        }

Thanks
Kamal

 
Old February 16th, 2007, 05:48 PM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope but i think i need explanation on this code that i have...may be its because of this....

protected virtual void RenderAttributes(HtmlTextWriter writer)
        {
            if (base.ID != null)
            {
                writer.WriteAttribute("id", base.ClientID);
                writer.WriteAttribute("name", this.UniqueID);
            }
            if (!this.Enabled)
                writer.WriteAttribute("Enabled","false");

            writer.WriteAttribute("ParentFormID", this.ClientID);
            if (this.AutoPostBack)
            {
                string sOnChangeCmd = this.Attributes["onchange"];
                if (sOnChangeCmd != null)
                {
                    this.Attributes["onchange"] = (sOnChangeCmd.EndsWith(";")) ? sOnChangeCmd + Page.GetPostBackEventReference(this, String.Empty)+ ";" : sOnChangeCmd + ";" + Page.GetPostBackEventReference(this, String.Empty);
                }
                else
                {
                    this.Attributes.Add("onchange", Page.GetPostBackEventReference(this, String.Empty));
                }
            }
            this.Attributes.Render(writer);
        }

if you look at the GetPostBackEventReference it is returning empty strings.I wonder why?


 
Old February 16th, 2007, 05:51 PM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

and another thing that doesnt work in my code is on PreRendor if i add Page.RegisterPostBackScript as in this example , it gives me error that this method is not accessible because of protection level.

and to tell you the truth i am tired and confused now.

 
Old February 20th, 2007, 03:56 PM
Authorized User
 
Join Date: Dec 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mr Parsons,

I am sorry dont know your name.....:-)
Did you get chance to look into the code i sent you? Any new suggestions.

Thanks
Kamal






Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting ahead of IDataReader? technimedia BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 July 31st, 2007 11:34 AM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Drop Down List mrideout BOOK: Beginning ASP.NET 1.0 6 March 18th, 2005 03:32 AM
Drop Down List Beginner123 VB How-To 2 March 7th, 2005 01:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.