Showing posts with label tabcontainer. Show all posts
Showing posts with label tabcontainer. Show all posts

Monday, March 26, 2012

multirow tabs

I'd like to know if we can have a multirow tabs using the tabcontainer. Any help is greatly appreciated.

See if this works:
<ajaxToolkit:TabPanelrunat="server"><HeaderTemplate><div><div>Line 1<br/>
Line 2</div></div></HeaderTemplate><ContentTemplate></ContentTemplate></ajaxToolkit:TabPanel>
 Here's an article about using css with tabcontainer:http://mattberseth.com/blog/2007/09/more_sample_ajaxcontroltoolkit.html

Hi,

Thank you for your post!

As far as I know, theTabs contorl doesn't support multirow tabs.

If you indeed need one,would you please create one and share it with us?

Thanks!

Best Regards,

Mutiable Roll of Tabs

I want two rolls of tabs. I make the tabcontainer Width 650px and the tabs show up in the display as two rolls of tabs but when I run it I get a tabcontainer that is 650px with one roll of tab go on the right and do not give me the two roll. Is it possible to get two rolls of tab for the same container?

Hi,

Tabcontainer extender support multi row header now. You may need to make change to the source code of the tabContainer by yourself.

Saturday, March 24, 2012

my page is slower with ajax than without it. Help!

Hi,

I am using ajax extensions 1.0 and ajaxcontroltoolkit in my web pages. I only use the calendarextender and the tabcontainer of the toolkit.

On the other hand I use an updatepanel that contains my controls and grid in the page.

When I test the web page with ajax, it is slower than when I test it without the scriptmanager and updatepanel, etc.

I have in the web config:

<compilationdebug="false">

<scriptResourceHandlerenableCompression="true"enableCaching="true"/>

Is it common that ajax is slower than the normal page?

What can I do to make ajax faster?

thanks in advance,

Daniel.

Take a look at this post:http://encosia.com/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/

That's not to say you should never use an UpdatePanel, but you need to understand how it works and use it appropriately. Without knowing more about your particular page's design, it's hard to give more specific advice.


Ok, thank you for the information.

I have a question:

Is it bad to have only one updatepanel that surrounds all the controls in the web page? or it is better to have several updatepanels in the web page?

Is not there any other way to put faster the perfomance in ajax to have it the same speed that the web page without ajax?

thanks a lot,

Daniel.


If your page has more than just a few controls on it, I would definitely recommend using multiple UpdatePanels. You can't avoid the ViewState and page reinstantiation, but you can at least cut down on how much HTML is returned and how much work the PageRequestManager has to put into parsing and updating that content. Make sure to use an UpdateMode of Conditional when working with multiple UpdatePanels.

If you want faster performance, try to use web methods or page methods as I describe in my post. When using light weight mechanisms like that, you can both achieve huge performance gains and reduce server load.


Hi,

I am still having the problem: my page is slower with ajax, than without it.

I have an updatepanel for the page. I tried to put the updatepanel only for the gridview but everything was the same, so I think my problem is not that I'm using only one updatepanel for the whole page.

Can you see my code below and help me, please?

I have several panels, objectdatasource, one gridview, code in HTML.

thanks a lot,

Daniel.

<%@.PageLanguage="C#"MasterPageFile="~/_plantillas/plantillamain.master"AutoEventWireup="true"CodeFile="clientesabc.aspx.cs"Inherits="clientes_clientesabc"Title="Untitled Page" %>

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel1"runat="server"UpdateMode="conditional">

<ContentTemplate>

<asp:PanelID="pnlExterior"runat="server"Width="100%">

HTML

<asp:PanelID="pnlDatos"runat="server"Width="100%"Visible="false">

HTML

</asp:Panel>

<asp:PanelID="pnlResumenVentasCompras"runat="server"Width="100%"Visible="false">

HTML

</asp:Panel>

<asp:LabelID="lblTituloGrid"runat="server"CssClass="LabelRealizado"></asp:Label>

<asp:LinkButtonID="lbtQuitarFiltro"runat="server"OnClick="lbtQuitarFiltro_Click"CausesValidation="False">Quitar Filtro</asp:LinkButton><br/>

<asp:GridViewID="gvw1"runat="server"Width="100%"AllowPaging="True"AllowSorting="True"AutoGenerateColumns="False"DataKeyNames="intIDCodigoCliente_fl"DataSourceID="odsClientes"GridLines="Horizontal"CaptionAlign="Left"CssClass="CeldaFondoMasClara"BorderColor="Silver"BorderWidth="1px"OnPageIndexChanged="gvw1_PageIndexChanged"OnPageIndexChanging="gvw1_PageIndexChanging"OnRowDataBound="gvw1_RowDataBound"OnSelectedIndexChanged="gvw1_SelectedIndexChanged"OnSorted="gvw1_Sorted"OnSorting="gvw1_Sorting"PageSize="20">

<Columns>

<asp:TemplateFieldShowHeader="False">

<ItemTemplate>

<asp:ImageButtonID="ibtEliminar"runat="server"CausesValidation="false"CommandName="Delete"ImageUrl="~/_archivos/iconos/gridEliminar.gif"ToolTip="Eliminar"BorderWidth="0"ImageAlign="AbsMiddle"/>

</ItemTemplate>

<ItemStyleWidth="20px"/>

</asp:TemplateField>

<asp:CommandFieldButtonType="Image"ShowSelectButton="True"SelectImageUrl="~/_archivos/iconos/gridSeleccionar.gif"SelectText="Seleccionar">

<ItemStyleWidth="20px"/>

</asp:CommandField>

<asp:TemplateFieldHeaderText="# Cliente"SortExpression="intIDCodigoCliente_fl">

<ItemTemplate>

<asp:LabelID="lblNumeroCliente"runat="server"Text='<%# Bind("intIDCodigoCliente_fl") %>'></asp:Label>

</ItemTemplate>

<ControlStyleCssClass="TextBoxNormal"/>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Sucursal"SortExpression="vchNombreSucursal_fl">

<ItemTemplate>

<asp:LabelID="lblSucursal"runat="server"Text='<%# Bind("vchNombreSucursal_fl") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Razón Social"SortExpression="vchRazonSocial_fl">

<ItemTemplate>

<asp:LabelID="lblRazonSocial"runat="server"Text='<%# Bind("vchRazonSocial_fl") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="RFC"SortExpression="vchRFC_fl">

<ItemTemplate>

<asp:LabelID="lblRFC"runat="server"Text='<%# Bind("vchRFC_fl") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Contacto">

<ItemTemplate>

<spanclass="LabelSubrayado">Telef</span>:<asp:LabelID="lblTelefono1"runat="server"Text='<%# Bind("vchTelefono1_fl") %>'></asp:Label> ,<asp:LabelID="lblTelefono2"runat="server"Text='<%# Eval("vchTelefono2_fl") %>'></asp:Label><br/>

<spanclass="LabelSubrayado">Email</span>:<asp:HyperLinkID="hlkEmail"Text='<%# Bind("vchEmail_fl") %>'NavigateUrl='<%# Correo(Eval("vchEmail_fl")) %>'CssClass="EnlaceSinNegrita"runat="server"></asp:HyperLink><br/>

<spanclass="LabelSubrayado">Contacto</span>:<asp:LabelID="lblContacto"runat="server"Text='<%# Bind("vchContacto_fl") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Persona">

<ItemTemplate>

<asp:LabelID="lblPersona"runat="server"Text='<%# TipoPersona(Eval("bitPersonaFisica_fl"))%>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderImageUrl="~/_archivos/iconos/gridusuarioActivar.gif"HeaderText="Activo">

<ItemTemplate>

<asp:CheckBoxID="ckbActivo"runat="server"Checked='<%# ValorBoolean(Eval("IsApproved")) %>'Enabled="false"/>

</ItemTemplate>

<HeaderStyleHorizontalAlign="Center"/>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Tipo de Venta">

<ItemTemplate>

<asp:LabelID="lblTipoVenta"runat="server"Text='<%# Bind("ClienteEstatusVenta")%>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldShowHeader="False"HeaderText="CAMPOS OCULTOS">

<ItemTemplate>

<asp:LabelID="lblNombreCliente"runat="server"Text='<%# Bind("vchNombreCliente_fl") %>'></asp:Label>

<asp:LabelID="lblCalle"runat="server"Text='<%# Bind("vchCalle_fl") %>'></asp:Label>

<asp:LabelID="lblNumExterior"runat="server"Text='<%# Bind("vchNumeroExterior_fl") %>'></asp:Label>

<asp:LabelID="lblNumInterior"runat="server"Text='<%# Bind("vchNumeroInterior_fl") %>'></asp:Label>

<asp:LabelID="lblEntreCalle1"runat="server"Text='<%# Bind("vchEntreCalle1_fl") %>'></asp:Label>

<asp:LabelID="lblEntreCalle2"runat="server"Text='<%# Bind("vchEntreCalle2_fl") %>'></asp:Label>

<asp:LabelID="lblColonia"runat="server"Text='<%# Bind("vchColonia_fl") %>'></asp:Label>

<asp:LabelID="lblEstado"runat="server"Text='<%# Bind("Estado") %>'></asp:Label>

<asp:LabelID="lblMunicipio"runat="server"Text='<%# Bind("Municipio") %>'></asp:Label>

<asp:LabelID="lblPoblacion"runat="server"Text='<%# Bind("vchPoblacion_fl") %>'></asp:Label>

<asp:LabelID="lblFax"runat="server"Text='<%# Bind("vchFax_fl") %>'></asp:Label>

<asp:LabelID="lblCP"runat="server"Text='<%# Bind("vchCodigoPostal_fl") %>'></asp:Label>

<asp:LabelID="lblPrecioLista"runat="server"Text='<%# Bind("sinPrecioListaFacturar_fl") %>'></asp:Label>

<asp:LabelID="lblDescuento"runat="server"Text='<%# Bind("monDescuento_fl") %>'></asp:Label>

<asp:LabelID="lblDiasPlazo"runat="server"Text='<%# Bind("sinDiasPlazoPago_fl") %>'></asp:Label>

<asp:LabelID="lblDescuentoProntoPago"runat="server"Text='<%# Bind("monDescuentoProntoPago_fl") %>'></asp:Label>

<asp:LabelID="lblComision"runat="server"Text='<%# Bind("monComisionVenta_fl") %>'></asp:Label>

<asp:LabelID="lblLimiteCredito"runat="server"Text='<%# Bind("monLimiteCredito_fl") %>'></asp:Label>

<asp:LabelID="lblIDClienteEstatusVenta"runat="server"Text='<%# Bind("sinIDClienteEstatusVenta_fl") %>'></asp:Label>

<asp:LabelID="lblIDClienteMedioEmbarque"runat="server"Text='<%# Bind("sinIDClienteMedioEmbarque_fl") %>'></asp:Label>

<asp:LabelID="lblUserId"runat="server"Text='<%# Bind("UserId") %>'></asp:Label>

<asp:CheckBoxID="ckbCambiaPassword"runat="server"Checked='<%# ValorBoolean(Eval("bitCambiaPassword_fl")) %>'/>

<asp:CheckBoxID="ckbRevLu"runat="server"Checked='<%# ValorBoolean(Eval("bitRevisionLunes_fl")) %>'/>

<asp:CheckBoxID="ckbRevMa"runat="server"Checked='<%# ValorBoolean(Eval("bitRevisionMartes_fl")) %>'/>

<asp:CheckBoxID="ckbRevMi"runat="server"Checked='<%# ValorBoolean(Eval("bitRevisionMiercoles_fl")) %>'/>

<asp:CheckBoxID="ckbRevJu"runat="server"Checked='<%# ValorBoolean(Eval("bitRevisionJueves_fl")) %>'/>

<asp:CheckBoxID="ckbRevVi"runat="server"Checked='<%# ValorBoolean(Eval("bitRevisionViernes_fl")) %>'/>

<asp:CheckBoxID="ckbRevSa"runat="server"Checked='<%# ValorBoolean(Eval("bitRevisionSabado_fl")) %>'/>

<asp:CheckBoxID="ckbPagLu"runat="server"Checked='<%# ValorBoolean(Eval("bitPagoLunes_fl")) %>'/>

<asp:CheckBoxID="ckbPagMa"runat="server"Checked='<%# ValorBoolean(Eval("bitPagoMartes_fl")) %>'/>

<asp:CheckBoxID="ckbPagMi"runat="server"Checked='<%# ValorBoolean(Eval("bitPagoMiercoles_fl")) %>'/>

<asp:CheckBoxID="ckbPagJu"runat="server"Checked='<%# ValorBoolean(Eval("bitPagoJueves_fl")) %>'/>

<asp:CheckBoxID="ckbPagVi"runat="server"Checked='<%# ValorBoolean(Eval("bitPagoViernes_fl")) %>'/>

<asp:CheckBoxID="ckbPagSa"runat="server"Checked='<%# ValorBoolean(Eval("bitPagoSabado_fl")) %>'/>

<asp:LabelID="lblmonVenta01"runat="server"Text='<%# Bind("monVenta01_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta02"runat="server"Text='<%# Bind("monVenta02_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta03"runat="server"Text='<%# Bind("monVenta03_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta04"runat="server"Text='<%# Bind("monVenta04_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta05"runat="server"Text='<%# Bind("monVenta05_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta06"runat="server"Text='<%# Bind("monVenta06_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta07"runat="server"Text='<%# Bind("monVenta07_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta08"runat="server"Text='<%# Bind("monVenta08_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta09"runat="server"Text='<%# Bind("monVenta09_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta10"runat="server"Text='<%# Bind("monVenta10_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta11"runat="server"Text='<%# Bind("monVenta11_fl") %>'></asp:Label>

<asp:LabelID="lblmonVenta12"runat="server"Text='<%# Bind("monVenta12_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado01"runat="server"Text='<%# Bind("monPagado01_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado02"runat="server"Text='<%# Bind("monPagado02_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado03"runat="server"Text='<%# Bind("monPagado03_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado04"runat="server"Text='<%# Bind("monPagado04_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado05"runat="server"Text='<%# Bind("monPagado05_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado06"runat="server"Text='<%# Bind("monPagado06_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado07"runat="server"Text='<%# Bind("monPagado07_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado08"runat="server"Text='<%# Bind("monPagado08_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado09"runat="server"Text='<%# Bind("monPagado09_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado10"runat="server"Text='<%# Bind("monPagado10_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado11"runat="server"Text='<%# Bind("monPagado11_fl") %>'></asp:Label>

<asp:LabelID="lblmonPagado12"runat="server"Text='<%# Bind("monPagado12_fl") %>'></asp:Label>

</ItemTemplate>

<ControlStyleCssClass="oculto"/>

<ItemStyleCssClass="oculto"/>

<HeaderStyleCssClass="oculto"/>

<FooterStyleCssClass="oculto"/>

</asp:TemplateField>

</Columns>

<SelectedRowStyleCssClass="CeldaFilaBrillante"/>

<PagerSettingsMode="NumericFirstLast"/>

<PagerStyleCssClass="GridPaging"/>

<HeaderStyleHorizontalAlign="Left"CssClass="CeldaFondoClara"/>

</asp:GridView>

8 ObjectDataSource

</asp:Panel>

</ContentTemplate>

</asp:UpdatePanel>

</asp:Content>


have you tried to evaluate why the page is slow by using fiddler? This could give you an indication of where the slow down is occuring and also ensure that everything is being cached where it can be.

Also, if you have a large viewstate, you may want to look at overriding the PageStatePersister property and save your viewstate to session using theSessionPageStatePersister object.

Naming Convention to search for a control with $get

Is there another way to find a control when using a master page and a tabContainer ?

For now I'm using the following syntax in Ajax client script:

$addHandler($get("ctl00$myContentPlaceHolder$myTabContainer$myTab1$txtPostalCode"), "keyup",mapPostalCode);

It's a little long, no ??

Thank you !

Gerrie

I usually embed the control.ClientID in a javascript variable if I need it, like so:

var txtPostalCode = "<%= txtPostalCode.ClientID %>";

Note this only works (afaik) inside on-page script tags or in an embedded .js file (from an assembly), or in a registered script block.


Great!

$addHandler($get("<%= txtPostcalCode.ClientID %>"),"keyup", mapPostalCode);

it works !!!

Thanks for this little annoying problem... sometimes little things keep me awake :-)

Wednesday, March 21, 2012

Need help with TabContainer in DotNetNuke

When I add an AjaxControlToolkit TabContainer to a module, it does not display properly in IE6 or IE7, but it does in Firefox. You can view the problem here:

http://www.websmithing.com/portal/Tabs/tabid/64/Default.aspx

Here is the code:

<%@dotnet.itags.org. Control Language="C#" AutoEventWireup="true" CodeFile="Tabs.ascx.cs" Inherits="DesktopModules_TabTest_Tabs" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"
Height="200px" Width="200px">
<cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
</cc1:TabPanel>
</cc1:TabContainer>

using System;
using DotNetNuke;
using DotNetNuke.Entities.Modules;

public partialclass DesktopModules_TabTest_Tabs : PortalModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (DotNetNuke.Framework.AJAX.IsInstalled())
{
DotNetNuke.Framework.AJAX.RegisterScriptManager();
}
}
}

I built a very simple user control and put it onto an aspx page and had no problems with viewing it in IE. You can see it here:

http://www.websmithing.com/portal/TabPanel.aspx

So it somehow seems to be a problem related to DotNetNuke...

thanks

Nick

ps. I have posted the question in the DotNetNuke Forums

I want to thank David Anson of Microsoft for finding the solution to this problem. Here was our thread:

Thank you David, that was exactly the problem. The TabContainer isdisplaying properly now. My menus are a little bit off in DotNetNuke,but I'm going to work on fixing the skin rather than going back to theother doctype.

For those who want to know, here is where the fix needs tohappen. In Default.aspx.vb at about line 259, I changed theDocTypeValue from:

'Dim DocTypeValue As String = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">"

to:

Dim DocTypeValueAs String ="<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"

once again, thank you!
Nick

- Hide quoted text -

On Dec 4, 2007 10:11 PM, David Anson wrote:

The DOCTYPEs are subtly different and I'm wondering if theproblematic one is leaving the browser in quirks mode (according to myunderstanding of the last paragraph ofhttp://msdn2.microsoft.com/en-us/library/ms535242.aspx).If so, that could be the problem as we don't support quirks mode with theToolkit. Maybe try switching to the same DOCTYPE for both to see if that helps?


I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.