Showing posts with label dynamic. Show all posts
Showing posts with label dynamic. Show all posts

Monday, March 26, 2012

With dynamic created Tabs extender any postback produce error, and temporary fix

I found another bug with Tabs extender:

On the page aspx

<ajaxToolkit:TabContainerID="Tab1"runat="server"Width="300px"ScrollBars="Auto"Enabled="true"ActiveTabIndex="0"></ajaxToolkit:TabContainer>

Then from server side, I add several tabs, but any button, click on that page would produce error:

Line 44: public new TabPanel this[int index]
Line 45: {
Line 46: get { return (TabPanel)base[index]; }
Line 47: }
Line 48: }
Source File:C:\Inetpub\wwwroot\AtlasControlToolkit-14384\Development\AjaxControlToolkit\Tabs\TabPanelCollection.cs Line:46

I fixed it temporarily with file TabContainer.cs, line 302 by using try and catch:

protected override void LoadClientState(object clientState)
{
Dictionary<string, object> state = (Dictionary<string, object>)clientState;
if (state != null)
{
ActiveTabIndex = (int)state["ActiveTabIndex"];
object[] tabState = (object[])state["TabState"];
for (int i = 0; i < tabState.Length; i++)
{
try
{
Tabs[i].Enabled = (bool)tabState[i];
}
catch
{
continue;
}
}
}
}

The error is still exist with the newest build# 14429. Can someone at least put the try and catch block into the new build?

Saturday, March 24, 2012

Wizard with Update Panel

I have a Wizard control with inupdatepanel . I am trying to create dynamic wizard steps in pagepre_init event, but it is giving me an error " object reference not setto an instance of an object" . without updatepanel it's workingproperly.

Thanks in Advance

Do you have a fileupload control in the wizard? If so,see this thread.

hello.

please post a simple page that reproduces this problem.

would like a detailed explanation of dynamic populate page method

hey everyone

could someone explain to me what the bonuses are of using dynamic populate page method
(and therefore stuff like dynamiccontrolID and dynamicservicemethod)

as opposed to just executing a sqlcommand inside an eventhandler
when the user clicks a linkbutton

i know theres probably a really good reason
its just pretty muddy to me right now

thanks

Dynamic populate happens via a web service call and does not incur the overhead of a postback with full page lifecycle. The downside is that you can't create new server controls via a dynamic populate that are accessible in the underlying page.

DynamicServicePath: path to the web service