Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Wednesday, March 28, 2012

dynamic html production to call ajax post via javascript

I am maintaining a page that creates html (not server controls) elements dynamically and when one changes I need to call the ajax postback. Is that possible? The page that is created can't know ahead of time that it will need to post through ajax....

So long as you add a client-side Event handler to your html control when you create it, yes, you can wire it up to make asynchronous requests:http://www.mikesdotnetting.com/Article.aspx?ArticleID=40. Note, the methodology outlined in the article doesn't make an ASP.NET Ajax request or postback. It differs in that it only makes a call to the server-side method you want to invoke. This can be better than using ASP.NET Ajax, in that you aren't recreating all the controls on the page.

Dynamic Control creation and viewstate management (client to server)

Hi all,

I am new to AJAX and this is my first port.

In my requirement i need to create set of dynamic controls (multiple instances of a custom webcontrol) to do this i am following the below steps.

    I have a user control with update panel in itI have a button "Add" to add new instance.Hidden field count to check number of dynamic instances addedHidden field to keep track of dynamic id'sRemove button to remove the instanceHandle UpdatePanel Load event to load the previous instance of controls before the control renders
    I have custom web control which inherits the ASP:Table classI override CreateChildControls method to create controls setHidden field to maintain the disabled control ids

rendering dynamic controls and its viewstate is working fine.

I am facing problem here.

I have some business logic in which the if the user selects "Yes" as the option in a RadioButtonList i am disabling few controls in the dynamically rendered sets at clientside. How to I get the controls state in the CreateChildControl method to see what was the control state using the hidden field as i am not able to get the form Posted values at this time. (Note: I know that we can use the UniqueID of the hidden field, but this will not work here as the unique id will be still the control ID unique id will be different when it renders.

So i want to know how to manage the viewstate from client and server in this scenario?

I tried to put in words as simple as possible.

Thanks for the help

- Satish

Missed to add this

When user clicks on "Yes" radio button i am saving the control id in the hidden field where in server side i can see the value in the hidden field at the server side and load the control state (either enabled or disabled). i am having problem here on how to retain the control state from clientside to the server side when it renders.

Thanks

Satish

Saturday, March 24, 2012

DropDownLists OnSelectedIndexChanged wont fire

Here what I do

<atlas:UpdatePanel ID="mypanel" mode="always" runat="server">
<ContentTemplate>
<asp:DropDownList ID="mylist" runat="server"
DataSource="mydatasource"
DataTextField="mytext"
DataValueField="myvalue"
OnSelectedIndexChanged="mylist_SelectedIndexChanged" />
<asp:Label ID="mylabel" runat="server" />
<asp:TextBox ID="mytextbox" runat="server" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger controlID="mylist"
event="SelectedIndexChanged" />
</Triggers>
</atlas:UpdatePanel>

the logic is simple, when the selected item inside the DropDownList changed, it will change the value of the textbox. inside mylist_SelectedIndexChanged method in the codebehind file is just simple putting a value using mytextbox.Text = "something";

But unfortunatelly, when I click on the DropDownList, change it's selected item, nothing happend. The value of the textbox also didn't change.

Do I do something wrong here? or miss something? Please advise.


Thanks,

Lok

As far as I can see all you need to do is set theAutoPostBack="true"in the DropDownList. Works just fine for me that way.

Greetz,
Zentral


Hi Zentral,

Thanks for the reply.

But, it's true, that giving AutoPostBack="true" will not makes all the page portion refreshed? not just only the UpdatePanel portion?

Or because of the control inside an UpdatePanel, so all the postback action happened only affected particular UpdatePanel.

Regards,

Lok


Hey Lok,

That's correct, due to the fact that the DropDownList is nested within an UpdatePanel, only the data within the panel will be considered for the postback. In this case you can look at the UpdatePanel as a "page scope limiter". Thus only the content within the UpdatePanel will be re-rendered.

You can test this easily for example by placing a label inside the UpdatePanel and placing a different label outside the UpdatePanel. Place your DropDownList inside the UpdatePanel and set the AutoPostBack="true", implement the server event and within that event set both labels (the one inside the updatepanel and the one outside) to the same value. You will notice that only the label inside the UpdatePanel will have its value updated while the one outside will remain unchanged.

Greetz!
Zentral

DropDownLists in 2 separate updatepanels only work once, then dont.

Hey, i have 2 dropdownlists, both databound to my sql server, the first one simply selects anything from the "catagories" database. Autopostback is enabled. The next one is a select to the subcatagories database, with an inner join to catagories on the catagory_id column..

The idea here was to make an ajax enabled cascading databound dropdownlist, and it DOES work... but only once. i tried making the trigger the indexChanged event of the 1st dropdown list, but i have the same results. If i change catagories more than once, i will not get a subcatagory change..

Any ideas?

So not sure why DropDownList1 is in an UpdatePanel, but DropDownList2 is the issue here eh and is in a panel, and has a dependant control, being the first drop down list.

So the second one, add a Trigger like this;

<asp:AsyncPostbackTriggerControlID="DropDownList1"EventName="SelectedIndexChanged"/>

Is that any help? Post a snippet of your page here.

Cheers,

Steve


You should use the Cascading Dropdown of Ajax Control Toolkit, it is specially developed for this purpose. Checkout the live demo of it:
http://www.asp.net/AJAX/Control-Toolkit/Live/CascadingDropDown/CascadingDropDown.aspx


It says AsyncPostbackTrigger was a unknown element... Here's my code:

Catagory:<BR /><asp:DropDownList id="DropDownList1" runat="server" DataValueField="Catagory_ID" DataTextField="Catagory" DataSourceID="SqlDataSource2" AutoPostBack="True"></asp:DropDownList><asp:UpdatePanel id="UpdatePanel1" runat="server" >
<contenttemplate>
SubCatagory:<BR /><asp:DropDownList id="ddlSubCat" runat="server" DataValueField="SubCatagory_ID" DataTextField="SubCatagory" DataSourceID="ddlsubCatagory"></asp:DropDownList>

<asp:SqlDataSource id="SqlDataSource2" runat="server" SelectCommand="SELECT [Catagory], [Catagory_ID] FROM [db_Catagories]" ConnectionString="<%$ ConnectionStrings:floofieConnectionString %>"></asp:SqlDataSource><BR /><asp:SqlDataSource id="ddlsubCatagory" runat="server" SelectCommand="SELECT db_SubCatagories.SubCatagory, db_SubCatagories.SubCatagory_ID FROM db_Catagories INNER JOIN db_SubCatagories ON db_Catagories.Catagory_ID = db_SubCatagories.Catagory_ID WHERE (db_Catagories.Catagory_ID = @.catid)" ConnectionString="<%$ ConnectionStrings:floofieConnectionString %>"><SelectParameters>

<asp:ControlParameter PropertyName="SelectedValue" Name="catid" ControlID="DropDownList1"></asp:ControlParameter>
</SelectParameters>
</asp:SqlDataSource>
</contenttemplate>


KaziManzurRashid:

You should use the Cascading Dropdown of Ajax Control Toolkit, it is specially developed for this purpose. Checkout the live demo of it:
http://www.asp.net/AJAX/Control-Toolkit/Live/CascadingDropDown/CascadingDropDown.aspx

That looks really nice, is there any way of getting the web service code for vb.net?


Can you post the complete markup of UpdatePanel. If any of your dropdown is outsite the update panel set its AutoPostback=true and create AsyncPostbackTrigger in Update Panel which points to that dropdownlist.


KaziManzurRashid:

Can you post the complete markup of UpdatePanel. If any of your dropdown is outsite the update panel set its AutoPostback=true and create AsyncPostbackTrigger in Update Panel which points to that dropdownlist.

Sorry bout that, thought i had it all.

Catagory:<BR /><asp:DropDownList id="DropDownList1" runat="server" DataValueField="Catagory_ID" DataTextField="Catagory" DataSourceID="SqlDataSource2" AutoPostBack="True"></asp:DropDownList><asp:UpdatePanel id="UpdatePanel1" runat="server"> <contenttemplate>SubCatagory:<BR /><asp:DropDownList id="ddlSubCat" runat="server" DataValueField="SubCatagory_ID" DataTextField="SubCatagory" DataSourceID="ddlsubCatagory"></asp:DropDownList> <BR /><asp:SqlDataSource id="SqlDataSource2" runat="server" SelectCommand="SELECT [Catagory], [Catagory_ID] FROM [db_Catagories]" ConnectionString="<%$ ConnectionStrings:floofieConnectionString%>"></asp:SqlDataSource><BR /><asp:SqlDataSource id="ddlsubCatagory" runat="server" SelectCommand="SELECT db_SubCatagories.SubCatagory, db_SubCatagories.SubCatagory_ID FROM db_Catagories INNER JOIN db_SubCatagories ON db_Catagories.Catagory_ID = db_SubCatagories.Catagory_ID WHERE (db_Catagories.Catagory_ID = @.catid)" ConnectionString="<%$ ConnectionStrings:floofieConnectionString%>"><SelectParameters><asp:ControlParameter PropertyName="SelectedValue" Name="catid" ControlID="DropDownList1"></asp:ControlParameter></SelectParameters></asp:SqlDataSource></contenttemplate> <triggers><asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger></triggers> </asp:UpdatePanel>

I acctually fixed it... the problem was, there was 3 other updatepanels, and they all need to be set to conditional.

I cant beleive i didnt see that in the first place.

DropDownList SelectedIndexChanged not fire (Autopostback - true!)

1<asp:DropDownList ID="SectionsDDL" runat="server" DataSourceID="SectionsObDS"2AutoPostBack="True" OnSelectedIndexChanged="SectionsDDL_SelectedIndexChanged"3DataTextField="titleName" DataValueField="id">4</asp:DropDownList>56<asp:UpdatePanel ID="UpdatePanel1" runat="server">7<ContentTemplate>8<asp:Panel ID="sectData" runat="server">9<asp:Label ID="tstlbl" runat="server" />10</asp:Panel>11</ContentTemplate>12<Triggers>13<asp:AsyncPostBackTrigger ControlID="sectionsDDL" EventName="SelectedIndexChanged" />14</Triggers>15</asp:UpdatePanel>

Everything is ok when I choose any item in DDL but first. When I choose first SelectedIndexChanged not fire.

I tried to find answer on forum and could not.

it sounds like your first item is selected when the dropdown loads so if you pick that answer the selected index never changes. Try adding an additional item called Not Selected or choos one or something along those lines as the first item in the list then everytime you should postback.

AjaxButter


Or you could change the SelectedIndex property to -1

Wednesday, March 21, 2012

DropDownList event handler serevr side not called

Hello,

this is driving me crazy, below code does a post back to the server but DropDownList1_SelectedIndexChanged1 is never called on the server !
All other buttons work just fine !
If I remove the drop down list from the trigger, than it is called. What is going on here ?

<asp:dropdownlist id="DropDownList1" runat="server" autopostback="True" onselectedindexchanged="DropDownList1_SelectedIndexChanged1"
width="170px"></asp:dropdownlist>
<asp:updatepanel runat="server" id="upAvailability" updatemode="Conditional">
<ContentTemplate>
<asp:Label id="lbSearchResults" runat="server"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btSearch"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="btNavigateHotels"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
</Triggers>
</asp:updatepanel>

Hi

I recreated your page and linked up some events and it works fine. Here is what I ended up with, if you want to compare to yours.

HTML

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged1" Width="170px">
<asp:ListItem Value="1" Text="option 1"></asp:ListItem>
<asp:ListItem Value="2" Text="option 2"></asp:ListItem>
<asp:ListItem Value="3" Text="option 3"></asp:ListItem>
</asp:DropDownList>
<asp:UpdatePanel runat="server" ID="upAvailability" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="lbSearchResults" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btSearch" EventName="Click"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="btNavigateHotels" EventName="Click"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged">
</asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
<asp:Button runat="server" ID="btSearch" Text="search" OnClick="btSearch_Click" />
<asp:Button runat="server" ID="btNavigateHotels" Text="navigate hotels" OnClick="btNavigateHotels_Click" />
</form>

Codebehind

protected void Page_Load(object sender, EventArgs e)
{

}
protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
{
lbSearchResults.Text = DropDownList1.SelectedItem.Text;
}
protected void btSearch_Click(object sender, EventArgs e)
{
lbSearchResults.Text = "Search";
}
protected void btNavigateHotels_Click(object sender, EventArgs e)
{
lbSearchResults.Text = "Navigate Hotels";
}

All the events fire correctly. When I attached to the aspnet_wp I could step through the events, and the label control reflected the text I wrote into it.

I even tried calling DataBind() on the DropDownList to see if that killed the event, but it still worked.

I bet thats even more frustrating? :)

Could you post more of your code/page so i can replicate exactly what you have?

Thanks

PaulTAG


Paul.

thanks for your great help on this. I worked around the problem by calling the event handler myself via checking the __EVENTTARGET of the form.

It is very weird because if I add another drop down list this one gets called ! Looking into the Forms collection on the server I cant find the method names there, also not for the buttons which do work (meaning I do not find any Button1_Click in any form value). How does this work, how does ASP know what method to call on the server ? I could than see why this is not happening in my case

Thanks

Joe

DropDownList dont work inside ReorderList InsertItemTemplate ?

In want to have a DropDownList inside the InsertItemTemplate of my ReorderList.

Like this:
<asp:DropDownList ID="NewRecipientsList" runat="server" Width="180px"
DataSourceID="NewRecipientsSrc" DataTextField="UserName" DataValueField="UserId"
SelectedValue='<%# Bind("UserId") %>' /
But I get this error message at runtime:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."

Which I don't understand. Using a TextBox instead works perfectly:
<asp:TextBox ID="Test" runat="server" Text='<%# Bind("UserId") %>' /
And using the dropdownlist in other controls, like FormView or DetailsView does work. I can't understand why the combination of ReorderList + DropDownList doesn't work.Are you sure that's causing the problem? I just tried this with the ReorderList sample page and it worked fine - both in the EditTemplate and InsertTemplate.
No, I'm not sure.
As I said, I don't understand why this doesn't work. But I've noticed that replacing the DropDownList with a TextBox works.

May it be that the error message is misleading ? The "UserId" I'm binding to is a SqlServer uniqueidentifier, could that be a problem ? (Although I think I tried to bind to UserName, which is a string, and it didn't work either)
Are you sure it's not the binding of the DropDownList itself that's having problems? Meaning I notice that it's also databound to another data source.
Yes, I'm sure of that.
If I simply remove theSelectedValue='<%# Bind("UserId") %>' attribute, the problem goes away (and the dropdown is correctly filled).

I would like to know what I am doing wrong, too. I am getting the same error. Here is the code for my page:

<h3>

Sort and Add new Categories</h3>

Select Parent Category to Sort:<br/>

<asp:DropDownListID="DropDownList1"runat="server"AppendDataBoundItems="True"AutoPostBack="True"

DataSourceID="CatListDataSource"DataTextField="CategoryName"DataValueField="CategoryID">

<asp:ListItemValue="-1"><Select Parent Category></asp:ListItem>

<asp:ListItemValue="0">Top Level</asp:ListItem>

</asp:DropDownList><br/>

<br/>

<asp:ObjectDataSourceID="CatListDataSource"runat="server"DeleteMethod="Deletecategory"

InsertMethod="AddCategory"OldValuesParameterFormatString="{0}"SelectMethod="GetCategories"

TypeName="Categories"UpdateMethod="UpdateCategory">

<DeleteParameters>

<asp:ParameterName="categoryid"Type="Int32"/>

</DeleteParameters>

<UpdateParameters>

<asp:ParameterName="categoryid"Type="Int32"/>

<asp:ParameterName="categoryname"Type="String"/>

<asp:ParameterName="parentcategoryid"Type="Int32"/>

<asp:ParameterName="sortorder"Type="Int32"/>

</UpdateParameters>

<InsertParameters>

<asp:ParameterName="categoryname"Type="String"/>

<asp:ParameterName="parentcategoryid"Type="Int32"/>

<asp:ParameterName="sortorder"Type="Int32"/>

</InsertParameters>

</asp:ObjectDataSource>

<atlas:ScriptManagerid="MasterScriptManager"EnableScriptGlobalization="false"runat="Server">

</atlas:ScriptManager>

<cc1:reorderlistid="ReorderList1"runat="server"allowreorder="True"callbackcssstyle="callbackStyle"

datakeyfield="categoryid"datasourceid="CatKidsDataSource"sortorderfield="sortorder"ItemInsertLocation="End">

<ItemTemplate>

<divclass="itemArea">

<b>Category:</b><asp:LabelID="Label4"runat="server"Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("CategoryName"))) %>'></asp:Label>

</div>

</ItemTemplate>

<ReorderTemplate>

<asp:PanelID="Panel2"runat="server"CssClass="reorderCue">

</asp:Panel>

</ReorderTemplate>

<InsertItemTemplate>

<divstyle="padding-left:25px; border-bottom:thin solid transparent;border-top:thin solid transparent;">

<asp:PanelID="panel1"runat="server"DefaultButton="Button1">

Insert a new Category here<br/>

Category Name<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="Category"

ErrorMessage="Please enter a question"ValidationGroup="Insert">*</asp:RequiredFieldValidator>

<asp:TextBoxID="Category"Text='<%# Bind("CategoryName")%>'runat="server"></asp:TextBox><br/>

Parent Category:<br/>

<asp:DropDownListID="ParentName"runat="server"DataSourceID="CatList2DataSource"

DataTextField="CategoryName"DataValueField="CategoryID"ValidationGroup="Insert"AppendDataBoundItems="True"SelectedValue='<%# Eval("ParentCategoryID") %>'>

<asp:ListItemValue="0">Top Level</asp:ListItem>

</asp:DropDownList><asp:ObjectDataSourceID="CatList2DataSource"runat="server"OldValuesParameterFormatString="original_{0}"

SelectMethod="GetCategories"TypeName="Categories"></asp:ObjectDataSource>

<asp:ButtonID="Button1"runat="server"CommandName="Insert"Text="Add"ValidationGroup="Insert"></asp:Button>

</asp:Panel>

</div>

</InsertItemTemplate>

</cc1:reorderlist>

<asp:ObjectDataSourceID="CatKidsDataSource"runat="server"InsertMethod="AddCategory"

OldValuesParameterFormatString="original_{0}"SelectMethod="GetCategoriesByParent"

TypeName="Categories"UpdateMethod="UpdateCategory"DeleteMethod="Deletecategory">

<UpdateParameters>

<asp:ParameterName="categoryid"Type="Int32"/>

<asp:ParameterName="categoryname"Type="String"/>

<asp:ParameterName="parentcategoryid"Type="Int32"/>

<asp:ParameterName="sortorder"Type="Int32"/>

</UpdateParameters>

<SelectParameters>

<asp:ControlParameterControlID="DropDownList1"Name="parentid"PropertyName="SelectedValue"

Type="Int32"/>

</SelectParameters>

<InsertParameters>

<asp:ParameterName="categoryname"Type="String"/>

<asp:ParameterName="parentcategoryid"Type="Int32"/>

<asp:ParameterName="sortorder"Type="Int32"/>

</InsertParameters>

<DeleteParameters>

<asp:ParameterName="categoryid"Type="Int32"/>

</DeleteParameters>

</asp:ObjectDataSource>


I had the same problem. To get around the problem I added some hidden fields that the dropdown updated, and bound the hidden fields and this worked for me:

<InsertItemTemplate>

<!-- bottom border is workaround for IE7 Beta issue where bg doesn't render -->

<divstyle="padding-left:25px; border-bottom:thin solid transparent;">

<asp:PanelID="panel1"runat="server"DefaultButton="Button1">

<asp:DropDownListID="DDLResources"runat="server"

OnPreRender="DDLResources_PreRender"ValidationGroup="Add"OnSelectedIndexChanged="DDLResources_SelectedIndexChanged"/>

<asp:HiddenFieldID="hdnResourceId"runat="server"value='<%# Bind("ResourceId") %>'/>

<asp:HiddenFieldID="hdnResourceCode"runat="server"value='<%# Bind("ResourceCode") %>'/>

<asp:ButtonID="Button1"runat="server"CommandName="Insert"Text="Add"ValidationGroup="Add"/>

</asp:Panel>

</div>

</InsertItemTemplate>

dropdownlist and server side validation control

Hi

I have a dropdownlist and it has a required field validator inside an updatepanel. Validation is done on server side and client side is disabled.
I have other controls with required field validations (server side only) and is NOT inside update panel.

The issue is when i select an item in dropdownlist it does a partial postback and validation is performed and the error message next to the dropdownlist will disappear. But for the other controls though the user fills in the data, the error message will only disappear on full postback on submit button click. This might be confusing for the user.

How can i make it work to have a standard error message display ONLY ON submit button click for all controls (including the partial postback controls inside updatepanel) ?

Is there any way i can do other than,
1. validation summary on top/bottom of the page.
2. Taking validation control outside update panel. If i have more than 10 controls, then i need to add more than 10 update panel and html table structures etc. etc.

Any ideas?

Thanks
Ganesh K

Validators are not compatibale with ASP.NET AJAX 1.0

http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx

You can download another version of validators from here

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

DropDownExtender: How can I set the text of downlist?

Hi,

I need your kindly help.When I try to use DropDownExtender just as following:

<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Always" RenderMode="Inline">
<ContentTemplate>
<cc1:DropDownExtender ID="dropdownextender" runat="server" Enabled="true" TargetControlID="fromTime" DropDownControlID="calender" >
</cc1:DropDownExtender>
<asp:Calendar ID="calender" runat="server" OnSelectionChanged="calender_SelectionChanged" ></asp:Calendar>
<asp:DropDownList ID="fromTime" runat="server" AutoPostBack="false" Width="90%">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="calender" />
</Triggers>
</asp:UpdatePanel>

protected void calender_SelectionChanged(object sender, EventArgs e)
{
fromTime.Text = calender.SelectedDate.ToString();
}

Although I can get the SelectedDate, but formTime.Text is “”all the time.Is there anything wrong? How can I set the text?

Many Thanks&&Best Reguards

Nicorn

Resolved.Big Smile

protected void fromcalender_SelectionChanged(object sender, EventArgs e)
{
fromTime.Items.Clear();
string[] date = fromcalender.SelectedDate.ToString().Split(' ');
fromTime.Items.Add(new ListItem(date[0], date[0]));
}


Big Smile Fixed ^_^

protected void fromcalender_SelectionChanged(object sender, EventArgs e)
{
fromTime.Items.Clear();
string[] date = fromcalender.SelectedDate.ToString().Split(' ');
fromTime.Items.Add(new ListItem(date[0], date[0]));
}

DropDownExtender: Edit TextBox attached to DropDownExtender

Is there a way to edit the textbox that is attached to the dropdownextender.

1<asp:TextBox ID="txtLocation" runat="server" OnTextChanged="txt_TextChanged" />
2 <cc1:DropDownExtender ID="DropDownExtender1" runat="server" DropDownControlID="Panel1" TargetControlID="txtLocation">
3 </cc1:DropDownExtender>

I have tried adding a textbox to Panel1 but it disappears as soon as i click on it.

Marty

My guess would be that once the TextBox in the Panel receives focus, the Panel loses focus, and that causes the Extender's script to think that it should close the Panel.

It sounds like you need a Panel that doesn't auto-close and you have to manually close. That way you can do data entry on the Panel.


And how is that done?
Popup window, modal dialog, roll your own iframe or floating div...

Hi ,

I am facing same problem.Can you please tell me how can I solve it?

Many thanks,

Ramesh.


Any solution about this issue ?