Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Wednesday, March 28, 2012

System.Web.UI.UpdatePanel does not have a public property named UpdatePanelAnimationExtend

'System.Web.UI.UpdatePanel' does not have a public property named 'UpdatePanelAnimationExtender'.

I have nothing but problems with ASP.Net AJAX. Could somebody tell me what is going on?

Newbie

The updatepanel doesn't have a public property named that - you have to use the AjaxToolkit to get that animation feature...

http://www.codeplex.com/AtlasControlToolkit

and from the sample website this is the code:

<%@.Page

Language="C#"

MasterPageFile="~/DefaultMaster.master"

AutoEventWireup="true"

CodeFile="UpdatePanelAnimation.aspx.cs"

Inherits="UpdatePanelAnimation_UpdatePanelAnimation"

Title="UpdatePanelAnimation Sample" %>

<%@.Register

Assembly="AjaxControlToolkit"

Namespace="AjaxControlToolkit"

TagPrefix="ajaxToolkit" %>

<asp:ContentContentPlaceHolderID="SampleContent"Runat="Server">

<asp:ScriptManagerrunat="server"EnablePartialRendering="true"/>

<divclass="demoarea">

<divclass="demoheading">UpdatePanelAnimation Demonstration</div>

<divstyle="margin-bottom: 10px;">

<divstyle="border: dashed 1px #222222;">

<divid="up_container"style="background-color: #40669A;">

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

<ContentTemplate>

<divid="background"style="text-align: center; vertical-align: middle; line-height: 44px; padding: 12px; height: 44px; color: #FFFFFF;">

<asp:LabelID="lblUpdate"runat="server"Style="padding: 5px; font-size: 14px; font-weight: bold;">

4/28/1906 12:00:00 AM

</asp:Label>

</div>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="btnUpdate"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

</div>

</div>

</div>

Choose the effects, then press 'Update':<br/>

<inputtype="checkbox"id="effect_fade"checked="checked"/><labelfor="effect_fade">Fade</label><br/>

<inputtype="checkbox"id="effect_collapse"checked="checked"/><labelfor="effect_collapse">Collapse</label><br/>

<inputtype="checkbox"id="effect_color"checked="checked"/><labelfor="effect_color">Color Background</label><br/>

<asp:ButtonID="btnUpdate"runat="server"Text="Update"OnClick="btnUpdate_Click"/>

<ajaxToolkit:UpdatePanelAnimationExtenderID="upae"BehaviorID="animation"runat="server"TargetControlID="update">

<Animations>

<OnUpdating>

<Sequence>

<%-- Store the original height of the panel --%>

<ScriptActionScript="var b = $find('animation'); b._originalHeight = b._element.offsetHeight;"/>

<%-- Disable all the controls --%>

<Parallelduration="0">

<EnableActionAnimationTarget="ctl00_SampleContent_btnUpdate"Enabled="false"/>

<EnableActionAnimationTarget="effect_color"Enabled="false"/>

<EnableActionAnimationTarget="effect_collapse"Enabled="false"/>

<EnableActionAnimationTarget="effect_fade"Enabled="false"/>

</Parallel>

<StyleActionAttribute="overflow"Value="hidden"/>

<%-- Do each of the selected effects --%>

<Parallelduration=".25"Fps="30">

<ConditionConditionScript="$get('effect_fade').checked">

<FadeOutAnimationTarget="up_container"minimumOpacity=".2"/>

</Condition>

<ConditionConditionScript="$get('effect_collapse').checked">

<ResizeHeight="0"/>

</Condition>

<ConditionConditionScript="$get('effect_color').checked">

<ColorAnimationTarget="up_container"PropertyKey="backgroundColor"

EndValue="#FF0000"StartValue="#40669A"/>

</Condition>

</Parallel>

</Sequence>

</OnUpdating>

<OnUpdated>

<Sequence>

<%-- Do each of the selected effects --%>

<Parallelduration=".25"Fps="30">

<ConditionConditionScript="$get('effect_fade').checked">

<FadeInAnimationTarget="up_container"minimumOpacity=".2"/>

</Condition>

<ConditionConditionScript="$get('effect_collapse').checked">

<%-- Get the stored height --%>

<ResizeHeightScript="$find('animation')._originalHeight"/>

</Condition>

<ConditionConditionScript="$get('effect_color').checked">

<ColorAnimationTarget="up_container"PropertyKey="backgroundColor"

StartValue="#FF0000"EndValue="#40669A"/>

</Condition>

</Parallel>

<%-- Enable all the controls --%>

<Parallelduration="0">

<EnableActionAnimationTarget="effect_fade"Enabled="true"/>

<EnableActionAnimationTarget="effect_collapse"Enabled="true"/>

<EnableActionAnimationTarget="effect_color"Enabled="true"/>

<EnableActionAnimationTarget="ctl00_SampleContent_btnUpdate"Enabled="true"/>

</Parallel>

</Sequence>

</OnUpdated>

</Animations>

</ajaxToolkit:UpdatePanelAnimationExtender>

</div>

<divclass="demobottom"></div>

System.Web.UI.ScriptManager not recognized

Hi All,

First of all I am new to using Ajax controls, and am having a bit of trouble trying to add them to an exsisting ASP.NET application.

I am using:

Windows Vista Business

IIS7

VS 2005 SP1

AJAX 1.0

When trying to add an Ajax script manager to a page i get an error in the designer.vb file saying that the System.web.ui.scriptmanager type is not recognized. Also when I try to run the app I get the "sys is not found" javascript error which I would expect is related to my issue.

I have searched the fourms etc for quite a while and have found one other post regarding this, although it didn't seem to solve my problem.

I have tried running a Ajax enabled project and tested it in both the VS and IIS webservers which works well. I have also copied a web.config file from an Ajax enabled site so I dont think it is the web.config file.

Could anyone shed some light on this?

Thanks in advance.

Glen

http://www.emmersivemedia.com.au

First of all When u create "AJAX Enabled Site", You don't have to manually include

ScriptManager Control. It will be automatically placed on the form.


Why do you want to place ScriptManager manually ?

You can use directly AJAX Enabled Web Site..


Hi Chetan,

I am adding Ajax controls to a "Standard" ASP.NET application and not a Ajax enabled app, when adding the control which i want to use (ModalPopup) it says that it requires an instance of the ScriptManager Control on the page which makes sense as to my understanding any page that uses Ajax controls needs a ScriptManager control or a ScriptManager Proxy.

The reason I mentioned the Ajax Enabled site is that I guess it illustrates the fact that its not a problem with the instalation of Ajax but rather an issue specifically with the app i am working with.

Can you think of anything that I might have missed that would cause this to happen?

Thanks again for your help.

Regards,

Glen

Tab Container/Panel with Master Page

I have a VB.Net/Asp.Net 2005 application and I would like to use a Master Page with a tab control

Inside the master page I have a tab control with five Tab Panels and I would like to put a ContentPlaceholder inside each tab's ContentTemplate but I am not allowed to do that. Does anyone have any good samples using Tab Containers/Panels inside a master page like this?

thanks

Hi,

As you've discovered, it can't be used this way unless you change the access modifier of TabPanelContainer to public and rebuild it.

Tab Control - AjaxControlToolkit

Hi All,

I am using Tab control in asp.net ajax. I have two tabs and each tab has a gridview. Both the gridview is binded to Datasource, both has paging but only one grid paging is working the other one is not working.

Even the second grid paging event is fired, new dataset is binded to the grid but it is not reflected in the grid.

Why is this?

Any one has any idea on this?

Regards,

Techwork.

Hi All,

I found out soem what the cause for that but could not find the reason for that.

I am using the Active Tab Changed event to bind the grid whenever the postback happens, but the event is not getting fired in some cases.

If that event fires properly my issues are solved.

I used the clientside event to fire the server side event but no use, in that case Active Tab Changed event is not getting fired at any time.

I am creating the tab control dynamically, will that be a problem.

Same I tried by creating statically it is working.

regards,
Santha

Monday, March 26, 2012

Tab control Error

I am new to AJAX, I have downloaded the ASP.Net AJAX and installed it also add dll to my Visual Studio Environment Now I need to use tab control but when I place it on my VS Environment It gives me an errorError Rendering Controlall other controls are working. Can you please advice me.

Regards,

Asif

i got this error too.. what you have to do is open your source code and re-arrange the tags like following:

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

<cc1:TabContainerID="TabContainer1"runat="server">
<cc1:TabPanelID="TabPanel1"HeaderText="your header text #1"runat="server">
<ContentTemplate>
<!--

your web form controls goes here

-->

</ContentTemplate>
</cc1:TabPanel><cc1:TabPanelID="TabPanel2"HeaderText="your header text #2"runat="server">
<ContentTemplate>
<!--

your web form controls goes here

-->

</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer><br/>

the panel control must be inside in TabContainer control

Tab Control Not working Properly in Update Panel.

I am having one update panel. inside that having some ASP Controls and a Tab Control. Now whenever this Update panel tries to Update, My tab control gets disappeared. It is not displyaed on the page.

Can you elaborate on what you are trying to do eg.

UpdatePanel -> Tab Container -> Tab - Some ASP.NET controls

Also, are you doing this in the Designer in Visual Studio? ie drag and drop designing.? otherwise?


Hi mistry,

To indicate the real problem, your source code is needed.However , here is the url that has a sample shows how to use these controls (Please focus on the source code). Hope it helps.

http://forums.asp.net/p/1128124/1784927.aspx#1784927

If your problem is still exist, please let me know.


Hi,

I tried what you described, it worked fine. Here is my code:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> </div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2"> <ContentTemplate> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> </form></body></html>
You may compare it with your code to find out the reason.

Saturday, March 24, 2012

Tabcontainer & Tabpanel

I just installed the AJAX Extensions and AJAX ControlToolkit. I'm trying to use the TabContainer and the TabPanel so I can have tabs on my ASP form. Here is my sample:

<ajaxToolkit:TabContainerID="TabContainer1"runat="server"ActiveTabIndex="0"CssClass="ajax__tab_xp">

<ajaxToolkit:TabPanelID="TabPanel1"runat="server"HeaderText="Tab one heading">

<ContentTemplate> Tab 1 Text

<asp:ButtonID="Button1"runat="server"Text="Button"/>

</ContentTemplate>

</ajaxToolkit:TabPanel>

<ajaxToolkit:TabPanelID="TabPanel2"runat="server"HeaderText="Tab two heading"Enabled="false">

<ContentTemplate> Tab 2 Text

<asp:ButtonID="Button2"runat="server"Text="Button"/>

<asp:CheckBoxID="CheckBox1"runat="server"/></ContentTemplate>

</ajaxToolkit:TabPanel>

</ajaxToolkit:TabContainer>

But when i go into Design view all i get is a grey 'TabContainer - TabContainer1' box. I would like to be able to view the tabs and add buttons, labels, textboxes, and pictures into each tab in design mode. Is there a way to do that or another option to look at for tabs in a web application?

We do not have extensive support for tabs in design mode. We do have awork item tracking it though. Currently you will have to customize tabs using the code view.

Are there other kinds of ways to use a tabpanel? For example, writing a seperate .aspx page and display that in each tab? I found you could use IFRAME's but is that the only way to do something like that? There were concerns about using frames that some browsers may block that from working, so is there another option to display multiple .aspx pages in one web window, in a tab panel?

Are there other kinds of tabpanels for asp?

Thanks!


merickson:

Are there other kinds of ways to use a tabpanel? For example, writing a seperate .aspx page and display that in each tab?

I wrapped the desired TabPanel content in a Web User Control. The user control can be edited in both views and the TabPanel simply contains the control, like so:

<ajaxToolkit:TabPanel runat="Server" ID="urlTabPanel" HeaderText="User Control">
<ContentTemplate>
<BaBu:MyUserControl runat="server" />
</ContentTemplate>
</ajaxToolkit:TabPanel>

--

babu


TabContainer always hidden

hi there,

my tabcontainer is always rendered as hidden.

this is the asp code

 <td class="text1"> <ajaxToolkit:TabContainer runat="server" ID="TabContainer1" Visible="true"> <ajaxToolkit:TabPanel runat="server" ID="TabPanel1" HeaderText="TabPanel1"> <ContentTemplate> TabPanel1 </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel runat="server" ID="TabPanel2" HeaderText="TabPanel2"> <ContentTemplate> TabPanel2 </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel runat="server" ID="TabPanel3" HeaderText="TabPanel3"> <ContentTemplate> TabPanel3 </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </td>

and this is how it renders

<td class="text1"> <div class="ajax__tab_xp" id="ctl00_ContentPlaceHolder1_TabContainer1" style="visibility:hidden;"><div id="ctl00_ContentPlaceHolder1_TabContainer1_header"><span id="__tab_ctl00_ContentPlaceHolder1_TabContainer1_TabPanel1">TabPanel1</span><span id="__tab_ctl00_ContentPlaceHolder1_TabContainer1_TabPanel2">TabPanel2</span><span id="__tab_ctl00_ContentPlaceHolder1_TabContainer1_TabPanel3">TabPanel3</span></div><div id="ctl00_ContentPlaceHolder1_TabContainer1_body"><div id="ctl00_ContentPlaceHolder1_TabContainer1_TabPanel1"> TabPanel1 </div><div id="ctl00_ContentPlaceHolder1_TabContainer1_TabPanel2" style="display:none;visibility:hidden;"> TabPanel2 </div><div id="ctl00_ContentPlaceHolder1_TabContainer1_TabPanel3" style="display:none;visibility:hidden;"> TabPanel3 </div></div></div> </td>

can any advise me how to fix this please?

Maurice

it may be obvious to most people but the first div is meant to have the style="visibility:hidden;" but the control is never rendered to the screen, i.e. i cant see the tabs.

Maurice


I've dynamic TabContainer (in code behind), andyourTabContainer.ActiveTabIndex = 0; helped me to solve this issue.


I also have this same problem where the tabcontainer and its tabpanels are always hidden. The HTML markup is all there when you view source of the page but the container and panels have a style attribute of visibility:hidden.

This displays fine in IE6 but under Firefox 1.5.0.12 the tabs are always hidden.

Does any one have any ideas why it does this?


I managed to fix my problem.

The problem was I had a calendar extender control within the tabpanel that had its ondateselection property set. For some unknown reason with that property set, Firefox refuses to display the tabcontainer.

Wednesday, March 21, 2012

TabContainer and Tab Panel for Beginners

Good Morning Everyone,

I'm a noob to the whole visual studio 2005, ASP.net, and AJAX.net thing. I've been searching on a walkthrough or tutorial on how to properly use the Tabs component in the ajax toolkit, but haven't found much yet. If anyone could point me in the right direction that would be great.

Cheers

Here's an instructional video:

TabPanel instructional video: http://aspalliance.com/1175_Video_Using_the_ASPNET_AJAX_Tabs_Control



Thanks for the video! But unfortunately my computer at work is a tad on the older side and unfortunately won't play the video link. I will watch it at home this weekend and see what I can learn. By chance do you know of any text tutorials for tabs?

TabContainer ClientState problem

I'm quite new in this AJAX stuff, so if you have any better solution, please post it.

Today I decided to use Tabs from ASP.NET AJAX Control Toolkit and found a stupid problem with them: The ClientState doesn't get updated when a post-pack is fired from drop-down list (OnIndexChanged event + AutoPostBack) or from custom control (I have server control that inherits from Button, but renders in a different way). It seems that the control toolkit framework doesn't process these post-backs as it should and the saveClientState of AjaxControlToolkit.TabContainer isn't called (basicaly it means, that all other controls that are derived from AjaxControlToolkit.ControlBase have this problem - correct me, if I'm wrong).

What I did was, that I added this function to the TabContainer class (in Tabs.js):

set_ClientState : function(value) {
var input = this.get_clientStateField();
if (input) {
input.value = value;
}
},

and

added this line:

this.set_ClientState(this.saveClientState());

before:

 if (this._loaded) {
this.raiseActiveTabChanged();
}
this.raisePropertyChanged("activeTabIndex");

in set_activeTabIndex function of AjaxControlToolkit.TabContainer.

Hope it helps someone.

I'm having the same problem. I'm trying to implement your solution, but I still get the same 'Specified argument was out of the range of valid values.Parameter name: index' error. I think it's because I'm not actually referencing the modifiedTabs.js file from my code.

I've made the correction that you specified in AJAX Control Toolkit\AjaxControlToolkit\Tabs.js and rebuilt the AjaxControlToolkit solution. I made sure that the new AjaxControlToolkit.dll is in AJAX Control Toolkit\AjaxControlToolkit\bin\Debug, AJAX Control Toolkit\SampleWebSite\Bin, AJAX Control Toolkit\AjaxControlExtender, and my web site's App_Data, which are all of the places that it existed. I'm not sure which, if any of those locations my app reads from. I tested removing all of them, but my app ran and the TabContainer/TabPanels were created, so I'm not sure it uses the dll in any of those locations.

Can you give me a pointer on how to get this done?


Hi bjs339 have you read this post?

http://forums.asp.net/t/1124541.aspx

I think the trick for you is to use the TabContainer event OnInit

TabContainer in an UpdatePanel (.NET 3.5)

I have recently upgraded a website from ASP.NET 2.0 and the appropriate AJAX Control Toolkit to use .NET 3.5 (with Visual Studio 2008 Beta 2) and the AJAX Control Toolkit that is available for the version. My website has several pages with a TabContainer inside an UpdatePanel. However now when an asynchronous postback occurs from buttons either inside the TabContainer or outside the TabContainer, the entire TabContainer seems to flicker. Note that only the TabContainer and it's contents seem to flicker and not the other contents outside of the TabContainer. Is anyone else experiencing results like this?

Thanks,

Kyle

I am experiencing the exact same problem. I have a tab container inside one update panel. I had no problems doing this on 2.0. I upgraded to 3.5 and on my new project my entire tab container is redrawn on every post back. When I click on a new tab, the content appears instantly, then it quickly redraws. Not sure if this is a bug, but cannot find any answers. Thanks for any help.

Wayne