Showing posts with label aspx. Show all posts
Showing posts with label aspx. Show all posts

Wednesday, March 28, 2012

System.WebForms.PageRequestManagerParserErrorException The message revieved from the serve

I am trying to use update panel's feature to asyncronously postback and update the data in one of my grid. I am using Master Page and ASPX and a User Control that actually contains the button, Update Panels and a Grid.

When I click btnRefresh I get the following error:

System.WebForms.PageRequestManagerParserErrorException The message revieved from the server could not be parsed...

My ascx looks like this:

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

<asp:UpdatePanelID="UpdatePanel1"runat="server"UpdateMode="Conditional">
<ContentTemplate>
<asp:ImageButtonID="btnRefresh"runat="server"ImageUrl="~/refresh.gif"OnClick="ImageButton1_Click"/>
</ContentTemplate>
</asp:UpdatePanel>

<asp:UpdatePanelID="UpdatePanel2"runat="server">
<Triggers>
<asp:AsyncPostBackTriggerControlID="btnRefresh"/>
</Triggers>
<ContentTemplate>
<igtbl:UltraWebGridID="UltraWebGrid1"runat="server"Height="200px"Width="468px"style="left: 1px; top: 226px">
</igtbl:UltraWebGrid>
</ContentTemplate>
</asp:UpdatePanel>

Could someone please suggest on this? Is the problem with User Controls??

Guys,

I added the script manager in my Master Page and then added scriptManagerProxy at my user controls which resolved the problem.

Cheers,

Ashish

Tab Control

the linkhttp://community.bennettadelson.com/blogs/rbuckton/archive/2007/02/02/Skinning-model-for-Calendar-and-Tabs-in-Ajax-Control-Toolkit.aspx on the Tab Sample pagehttp://ajax.asp.net/ajaxtoolkit/Tabs/Tabs.aspx is dead anyone know where this documentation is as I'm using the Tab control and need to modify the css a bitBig Smile

any help welcome I've been looking for this for about two weeks and the URL is still dead so I'm hoping someone made a copy to word etc.

Regards

Steve

Hi Steve,

This content in the link is now included inhttp://ajax.asp.net/ajaxtoolkit/Tabs/Tabs.aspx now.


Hello Raymond, I needs documentation about the tabs methods for the clientside. Please, can you help me with that? because I needs create a news tabs in clientside with javascript.

Greetings and thanks!


You can take a look into the source code of it. Corresponding client side functions can be found in tabs.js file.

My rough idea is that you instantiate a AjaxControlToolkit.TabPanel object and add it into the AjaxControlToolkit.TabContainer's _tabs array.


Thanks Raymond, but in the tabs.js file I can't found the method to add a new Tab. Please, can you write me some example code to create a Tab object and add this in a tabs collection?

Thanks again, and I waiting for your help!


The method used to add tab to a tabContainer is this:
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_TabContainer1_p2")}, null, {"owner":"TabContainer1"}, $get("TabContainer1_p2"));

And you need to create element with the above IDs. You can refer to the generated page's source to find out what should those elements should be like.

Monday, March 26, 2012

Tab control & master pages

How do I access a tab control that is on a Default.aspx form, which is diplayed in the ContentPlaceholder from my MasterPage.

Page.FindControl(string controlId) ?

I'm not sure, but I think this works...

Agapito


Nope it does not work.

Maybe im explaining wrong. The control resides in a Default.aspx that will be the ContentPlaceholder. I want to access the control from the master pages. The Tab control resides on the Default.aspx


I also tried

//Page.FindControl(TabContainer1);//Master.FindControl(TabControl1);this.ContentPlaceHolder1.FindControl(TabControl);

Given a Content Placeholder of "GCSContent" and a Tab Container of "TabContainer1", I am able to successfully find the control in the Page_Unload event of MasterPage.master using the following syntax:

this.GCSContent.FindControl("TabContainer1");

how do I accomplish this............?

It tells me that the TabContainer1 does not exist in the current context

protected void MenuItem_Click(object sender, MenuEventArgs e)
{
if (this.Menu1.SelectedItem.Value.Equals("1"))
{


this.ContentPlaceHolder1.FindControl("TabContainer1");
TabContainer1.ActiveTab = TabPanel2;

}

}


What is the ID of the tabContainer?

TabContainer myTabContainer = (TabContainer) this.ContentPlaceHolder1.FindControl("whatever_ID");

tab control and modelpopup

In my form aspx page, I have three panels, top of the page I have three input buttons controls how I display my panels, first button display panel1(hides panel2 and 3) , second button displays panel2(hides panel1 and panel3), third panel display panel3(hides panel1 and 2).

Only thing is, panel2 has one small subpanel and datagrid in it that for datagrid, I put a modelpopupextender , because I wanted when user clicks linkbutton inside the datagrid, I make modelpopup pops. That means it I have update panel inside the Panel2 already.

I have tried some javascript functions for displaying/hiding my panels when buttons are clicked, but I needed also for panel2 when user saves datagrid, page refreshes and needs to comes back to show panel2 again,it was keep showing panel1, I put some javascript for that would remember last button clicked, so could come back that one, but that gives me some problem, so maybe I should try Ajaxs Tab , but I get confused how would I set up that, because I already have updatepanel inside the panel2 for modelpopup, so how would I can put tab control for whole form? Would it effect Tab and modelpop up together ?

Any suggestions?

Hi,

I agree your idea of trying to use TabContainer control. With it, you don't need to worry about keep its state between postbacks.

For more information about how to use it, I'd suggest downloading the sample web sitehere and try the tabs page.

Saturday, March 24, 2012

TabContainer and DynamicServicePath

I am using a TabContainer and I would like to display the content of an aspx file inside each TabPanel of the TabContainer. I tried this code :

<ajaxToolkit:TabContainerrunat="server"ID="Tabs"Height="600px"Width="600px">

<ajaxToolkit:TabPanelrunat="server"ID="Panel1"HeaderText="Product Groups"DynamicServicePath="~/ConfProductGroup.aspx"Visible="true">

<ContentTemplate>

</ContentTemplate>

</ajaxToolkit:TabPanel>

<ajaxToolkit:TabPanelrunat="server"ID="Panel3"HeaderText="Products"DynamicServicePath="~/ConfProduct.aspx"Visible="true"/>

</ajaxToolkit:TabContainer>

But the tabcontainer doesn't display the content of aspx pages (ConfProduct.aspx , ConfProductGroup.aspx) when I click on a TabPanel.

Hi Suzi,

If you want to contain an entire asp.net page inside a TabPanel, you will probably need to fetch it prgramatically.

This video will show you how to do it.

http://asp.net/learn/videos/view.aspx?tabid=63&id=120

Joe


Thank you Joe for your advice. I am trying to test with this solution.


I am trying a sample example as you advice me. I have a Master page and an aspx page named Ajaxtab.aspx. I have no error when I test the Ajaxtab.aspx without a Master Page File. But if I add a master page file. I have an unknown error . Below, you will find my code. Thank you.

ajaxtab.aspx :

<%@.PageLanguage="C#"AutoEventWireup="true"MasterPageFile="~/Site.master"CodeFile="Ajaxtab.aspx.cs"Inherits="Tests_Ajaxtab"Title="MediterrumWorks : Ajaxtab" %>

<%@.MasterType

virtualpath="~/Site.master" %>

<%@.Register

Assembly="AjaxControlToolkit"

Namespace="AjaxControlToolkit"

TagPrefix="ajaxToolkit" %>

<asp:Content

ID="MainContent"

ContentPlaceHolderID="MainContent"

Runat="Server">

<divid="ResultId0"style="background-color:Aqua;"/>

</asp:Content>

and my master page :

<%@.MasterLanguage="C#"AutoEventWireup="true"CodeFile="Site.master.cs"Inherits="Site" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headid="Head1"runat="server">

<title>Mediterrum Works</title>

<linkrel="stylesheet"type="text/css"href="ajax__calendar.css"/>

</head>

<body>

<scripttype="text/javascript"language="Javascript">

function showHideLogo(){

var topbanner=window.document.getElementById('topbanner');

var arrow_top=window.document.getElementById('arrow_top');

if(topbanner.style.display=="none"){

topbanner.style.display="block";

document.images["arrow_top"].src="images/top_arrow_hide.gif";

document.images["arrow_top"].style.height="7px";

}else{

topbanner.style.display="none";

document.images["arrow_top"].src="images/top_arrow.gif";document.images["arrow_top"].style.height="7px";

}

}

function updateTime()

{

var label = document.getElementById('<%= CurrentTime.ClientID %>');

if (label) {

var time = (new Date()).localeFormat(" d/MM/yyyy ");var time = time +" " + (new Date()).localeFormat(" HH:mm ");

label.innerHTML = time;

}

}

updateTime();

window.setInterval(updateTime, 1000);

// Select a collection of CheckBoxList clicking on a CheckBoxList

function SelectAllCheckboxes(spanChk, chbxID)

{

var theBox= (spanChk.type=="checkbox") ? spanChk : spanChk.children.item[0];

xState=theBox.checked;

elm=theBox.form.elements;

for(i=0;i<elm.length;i++)if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)

{

var checkbox = elm[i];

// If a search parameter was passed in

if(chbxID)

{

// Check only thos checkboxes with an ID containing that parameter

if(checkbox.id.search(chbxID) != -1)

{

if(elm[i].checked!=xState)

elm[i].click();

}

}

// No search parameter, just check all checkboxes on the form

else

{

if(elm[i].checked!=xState)

elm[i].click();

}

}

}

</script>

<divid="container">

<formid="navtop"

runat="server"

style="margin: 0px">

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

<Scripts>

<asp:ScriptReferencePath="WebRequest.js"/>

</Scripts>

</asp:ScriptManager>

<asp:HiddenFieldID="aspHFvisible"Value="true"runat="server"/>

<divid="topbanner">

<tablecellpadding="0"cellspacing="0"border="0"width="100%">

<tr>

<td>

<img

src="images/TerrumWorks.gif"

alt="Semantic Solutions"

style="margin: 0px"/>

</td>

<td>

</td>

<tdstyle="text-align: left">

<imgsrc="images/userOnline.gif"height="16px"width="16px"alt=""/>

<asp:LoginName

ID="LoginName2"

runat="server"/>

</td>

<tdstyle="text-align: right">

<asp:LoginStatus

ID="LoginStatus2"

runat="server"

LogoutAction="RedirectToLoginPage"/>

</td>

</tr>

</table>

</div>

<divid="div-menu">

<tablecellpadding="0"cellspacing="1"border="0"width="100%">

<tr>

<td>

<asp:UpdatePanelID="aspUpdPanGeneralMenu"runat="server">

<ContentTemplate>

<asp:Menu

DataSourceID="SiteMapDataSource1"

ID="Menu1"

runat="server"

CssClass="navmenu"

Orientation="Horizontal"

StaticTopSeparatorImageUrl="~/images/ToolSep.gif"OnMenuItemClick="Menu1_MenuItemClick">

<StaticMenuItemStyle

CssClass="menuitem"/>

<StaticSelectedStyle

CssClass="menuselected"/>

<StaticHoverStyle

CssClass="menuitemhover"/>

<DynamicHoverStyle

BorderWidth="1px"

CssClass="menuitemhover"/>

<DynamicMenuItemStyle

CssClass="menuitem"/>

</asp:Menu>

<asp:SiteMapDataSource

ID="SiteMapDataSource1"

runat="server"

ShowStartingNode="False"/>

</ContentTemplate>

</asp:UpdatePanel>

</td>

</tr>

</table>

</div>

<divid="toolbar"style="clear: both">

<tablewidth="100%"cellpadding="0"cellspacing="1">

<tr>

<tdalign="left"width="15%"style="border:solid 0px black">

<asp:UpdateProgressID="aspUpdProg"runat="server">

<ProgressTemplate>

<table><tr><td>

<imgalt="Please Wait"height="13px"src="images/progressbar_long.gif"/>

</td>

<td>

<asp:Labelrunat="server"Text="Loading ..."/>

</td>

</tr></table>

</ProgressTemplate>

</asp:UpdateProgress>

</td>

<tdalign="left"width="35%"style="border:solid 0px black">

<asp:contentplaceholder

id="ContentPlaceHolderToolbar"

runat="server">

<asp:UpdatePanelID="aspUpdToolBarMessage"UpdateMode="Conditional"runat="server">

<ContentTemplate>

<asp:Image

ID="imgErrorMessage"

runat="server"

ImageUrl="~/images/red-error.gif"

Visible="True"Height="12px"/>

<asp:Label

ID="lblErrorMessage"

runat="server"

Visible="True"

CssClass="ErrorMessage"/>

<asp:Image

ID="imgLblMessage"

runat="server"

ImageUrl="~/images/info.gif"

Visible="True"/>

<asp:Label

CssClass="Message"

ID="aspLblMessage"

runat="server"/>

</ContentTemplate>

</asp:UpdatePanel>

</asp:contentplaceholder>

</td>

<tdalign="center"width="25%"style="border:solid 0px black">

<imgid="arrow_top"onclick="showHideLogo()"alt=""height="7px"src="images/top_arrow_hide.gif"/>

</td>

<tdalign="right"class="rightTable"width="25%"style="border:solid 0px black">

<spanid="CurrentTime"runat="server"class="toolbartime"/> |

<asp:Label

ID="AppVersion"

runat="server"

CssClass="toolbarversion"/>

</td>

</tr>

</table>

</div>

<divid="content">

<!-- Starting region layout for Sample Window -->

<asp:contentplaceholder

id="MainContent"

runat="server">

</asp:contentplaceholder>

<!-- Ending region layout for Sample Window -->

</div>

</form>

<divid="footer">

<tablewidth="100%"border="0">

<tr>

<td>

<address>

<asp:Literal

ID="footeraddress"

runat="server"

Text="<%$ Resources:Resource, FooterCopyright %>">

</asp:Literal></address>

</td>

<tdalign="right"valign="bottom">

</td>

</tr>

</table>

</div>

</div>

</body>

</html>


Hi,

I can't see where in your page is implementing incremental page.

Can you watch the video again and implement a similar feature?

If it still fails, can you provide a simpler page with less elements but include the problem you have?


Additional tip, you can useiFrame to include another form in current page.

TabContainer and TabPanel - Error Rendering Control, An unhandled exception has occurred.

I get this error in the designer when I place either TabContainer or TabPanel on any page in my project. I also get it if I look at the Tabs.aspx page in the toolkit sample website that comes with the source code. This has been happening for a while now and is rather anoying.

Anyone else get this error in the designer?

I only get it on the TabPanel
No resolution found yet


Are you saying that if you open Tabs.aspx from the SampleWebsite in the designer you get this error? Or when you run the page?

In either case, I don't see the problem. More info might help narrow it down.


Yes you do get this error if you have no ScriptManager control on your page. I assume you did the obvious and add one. Otherwise you've got an installation problem, because it works for me.

As of the Latest Release 23/01/2007 the errors are gone.Smile


I'm looking at putting together a bit of a better designer for tabs hopefully for the next release.

Thank you for your time. I look forward to the next release.


Currently, I'm experiencing the same error with the latest release.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.

Have you tried the following:

Make sure there is a ScriptManager as the top most component of the page or if you have a ScriptManager on a MasterPage then make sure it is before your Content areas.
I am also haveing the same issue. I started a new AJAX Website from the template provided and when I drag a tab panel onto the page I get the above error. I don't have an old version since I just downloaded it today.

Did anyone figure out the solution to this? I too downloaded a new version, only this tool is still giving me a problem by not working at all.

Wednesday, March 21, 2012

TabContainer flicker on tab mouse over

Hi,

I am using the AJAX Control Toolkit and have a TabContainer with two TabPanels on an aspx/VB page.

My problem is when I mouse over the tabs the page flickers.

Putting the TabContainer in an UpdatePanel makes no difference.

From what I have gathered this is due to the reloading of the tab images used by the 'ajax__tab_xp' CSS that is applied by default to the TabContainer.

Can anyone suggest a way to prevent the flicker (other than changing the cache settings in IIS)?

Apologies if this is a double up post (I looked and couldn't find any that answered the problem).

Thanks in advance,
David

I have this problem too! I noticed, however, that the 'demo' Ajax Toolkit site doesn't have this problem. there must be a way to prevent this, looks terrible.


Hi abgibbs,

I have not found a proper fix to this problem but this post http://forums.asp.net/t/1115791.aspx helped me to bang together a temporary hack fix.

I basically rewrote the entire Tabs CSS file so that it was no longer using background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-hover-left.gif")%>)to populate the background images of each TabPanel.

I made my own background images and imported them into my projects Images folder and now havebackground:url("./Images/TabIcon.gif")repeat-x ; in my StyleSheet.

It doesn't look nearly as good as the real deal but at least it no longer has that horrific flicker.

Hope this helps,
David


I don't see any problem on my tabpanels when hovering over the tabs ...


I've been using the tabcontainer a lot...

And there's obviously something weird about it: if you move your mouse over the headers, very often the content of the active tabpanel will "jump". If you have some text inside you will see it suddenly wrap differently for a second, for example.

I haven't found a way around it, but haven't really tried until now...

But moving your mouse over the headers has an effect on the size of the active TabPanel.