I'm using visualStudio 2010 vb
I have a UpdateProcess inside a TabContainer which I can not manage to make it show a loading image. I've added below the example code. I'm I missing something to make it show?
<asp:TabContainer ID="TabSelection" runat="server" ActiveTabIndex="0"
Width="1126px" Font-Bold="True" TabStripPlacement="Top"
style="margin-right: 34px; margin-top: 49px;" AutoPostBack="True">
<asp:TabPanel runat="server" HeaderText="Scorecard3" ID="TabScorecard3">
<HeaderTemplate>
Scorecard
</HeaderTemplate>
<ContentTemplate>
<asp:UpdateProgress ID="UProc_Scorecard" runat="server" AssociatedUpdatePanelID="UP_Scorecard"
DisplayAfter="1">
<ProgressTemplate>
<asp:Image id="wait" runat="server" ImageUrl="~/Images/wait3.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UP_Scorecard" runat="server">
<ContentTemplate>
… 3 Grids and 3 tables …
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DateSelection"
EventName="SelectedIndexChanged"/>
<asp:AsyncPostBackTrigger ControlID="GroupSelection"
EventName="SelectedIndexChanged"/>
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
Thanks
I've solved the problem by moving the UpdateProgress and the updatePannel outside the TabContainer also I removed the autopostback in the tabcontainer to prevent a postback each time a tab was selected. I hope this helps someone. Example code below...
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:UpdateProgress ID="UProc_TabContainer" runat="server" AssociatedUpdatePanelID="UP_TabContainer"
DisplayAfter="1">
<ProgressTemplate>
<div id="dvProgress" runat="server" style="position: absolute; top: 300px; left: 450px;
text-align: center;">
<asp:Image ID="wait" runat="server" ImageUrl="~/Images/wait3.gif" Height="120px"
Width="128px" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UP_TabContainer" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" BackColor="#66FFFF">
<asp:DropDownList ID="DateSelection" runat="server" AutoPostBack="True" Height="21px"
Width="134px">
</asp:DropDownList>
<asp:DropDownList ID="GroupSelection" runat="server" AutoPostBack="True" Height="21px"
Width="134px" >
</asp:DropDownList>
</asp:Panel>
<asp:TabContainer ID="TabSelection" runat="server" ActiveTabIndex="0" Width="1126px"
Font-Bold="True" TabStripPlacement="Top"
Style="margin-right: 34px; margin-top: 49px;">
<%-- AutoPostBack="True"--%>
<asp:TabPanel runat="server" HeaderText="Scorecard3" ID="TabScorecard3">
<HeaderTemplate>
Scorecard
</HeaderTemplate>
<ContentTemplate>
… grids and charts …
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel runat="server" HeaderText="Documentation" ID="TabInfo">
<ContentTemplate>
… documentation …
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="Project" runat="server" HeaderText="Project">
<ContentTemplate>
… documentation…
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
Related
<asp:ListView ID="lvSharingList" runat="server" OnItemDataBound="lvSharingList_ItemDataBound">
<LayoutTemplate>
<table id="tblList" runat="server" style="width: 100%;">
<tr runat="server" id="itemPlaceHolder" style="border: 1px solid rgb(208, 208, 208);"></tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr runat="server" id="tableRow" class="trShareItem" style="border: 1px solid rgb(208, 208, 208);">
<td runat="server" id="tableCell">
<div style="width: 10%; float: left; padding: 5px 5px; margin: 5px 5px; border: 1px solid rgb(208, 208, 208);">
<asp:Label Visible="false" ID="lblGroupId" Text='<%# Eval("GroupId") %>' runat="server"></asp:Label>
<asp:Label Visible="false" ID="lblShareId" Text='<%# Eval("ShareId") %>' runat="server"></asp:Label>
<asp:Image ID="imageForFriend" runat="server" CssClass="fromUsername" AlternateText='<%# Eval("Username") %>' />
<br />
<a href="#" id="aUsername2" runat="server" title='<%# Eval("Username") %>'></a>
</div>
<div style="width: 45%; float: left; padding: 5px 5px; margin: 5px 5px; border: 1px solid rgb(208, 208, 208);">
<asp:Label ID="lblPost" Text='<%# Eval("Post")%>' runat="server" CssClass="sharedPost"></asp:Label><br />
<abbr id="abbrId" class="timeago" title='<%# DataBinder.Eval(Container.DataItem, "PostedDate", "{0:M/d/yyyy hh:mm:ss tt}") %>' runat="server"></abbr>
<asp:Label runat="server" ID="lblImgFlag" Text='<%# Eval("imgFlag") %>' Visible="false"></asp:Label>
<asp:Image ID="imagePhoto" runat="server" CssClass="sharePhotoFile" />
<asp:Literal ID="literal" runat="server" Text='<%# Eval("video") %>'></asp:Literal>
</div>
<div style="width: 38%; float: left; height: 100%;">
<div>
<fieldset>
<legend>Comments</legend>
<asp:UpdatePanel ID="UpdatePanelToResetComment" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtShareComment" runat="server" CssClass="txtShareCommentClass"></asp:TextBox>
<asp:Button ID="btnComment" UseSubmitBehavior="false" runat="server" Text="Comment" CssClass="btn btn-small btn-primary" OnClick="btnComment_Click" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListView ID="listViewShareComments" runat="server">
<LayoutTemplate>
<ul id="itemPlaceHolder" runat="server">
</ul>
</LayoutTemplate>
<ItemTemplate>
<asp:Label ID="lblUsernameID" runat="server" Text='<%# Eval("Username") %>' CssClass="txtShareCommentClass"></asp:Label> :
<asp:Label ID="txtShareCommentID" runat="server" Text='<%# Eval("Comment") %>' CssClass="txtShareCommentClass"></asp:Label>
</ItemTemplate>
<ItemSeparatorTemplate>
<br />
</ItemSeparatorTemplate>
</asp:ListView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnComment" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</fieldset>
</div>
</div>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
I have the above example and I would like to know the best approach to locate a control within a child control. In the above example I have a ListView control that has a tableRow followed by tableCell. I have a listview within the tableCell. Why cant I locate the child listview directly from the page control? Why do I have to locate each runat=server control and then find the child control?
The following way works fine! I would like to know is there a better way to locate the child listview control?
HtmlTableCell tCell = (HtmlTableCell)lblShaId.Parent;
UpdatePanel updatePanel1 = (UpdatePanel)tCell.FindControl("UpdatePanel1");
ListView listViewShareComments1 = (ListView)updatePanel1.FindControl("listViewShareComments");
listViewShareComments1.DataSource = userMethods.GetAdminGroupShareComments(Convert.ToInt32(lblShaId.Text));
listViewShareComments1.DataBind();
It's just the way FindControl was implemented in ASP.Net - c.f. Better way to find control in ASP.NET for a more detailed discussion on some of the likely reasons it was implemented this way as well as some techniques on how to search for a control in a recursive manner.
I have a page that shows a ckeditor in an update panel. My page is as follows:
<form id="form1" runat="server">
<cc1:ToolkitScriptManager runat="server" ID="ToolkitScriptManager" EnablePartialRendering="true"></cc1:ToolkitScriptManager>
<div>
<asp:Label ID="Label1" runat="server" Text="Hello"></asp:Label><br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<script src="../../../../../ckeditor/ckeditor.js" type="text/javascript"></script>
<asp:TextBox class="ckeditor" ID="tbEditorHeader" runat="server" ClientIDMode="Static" TextMode="MultiLine" Columns="80" Rows="4"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
Has anyone seen this issue? Any known solutions?
Thanks for the help!!
Here is the code:
<body>
<form id="form1" runat="server">
<div>
<table width="100%">
<tr>
<td class="style1"></td>
<td class="style2">
<div id="back">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<asp:UpdatePanel ID="updPanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Timer ID="timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"></asp:Timer>
<asp:Table ID="Table1" runat="server" Width="100%">
<asp:TableRow>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label1" runat="server" Text="Hello1"></asp:Label>
</asp:TableCell>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label2" runat="server" Text="Hello2"></asp:Label>
</asp:TableCell>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label3" runat="server" Text="Hello3"></asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label4" runat="server" Text="Hello1"></asp:Label>
</asp:TableCell>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label5" runat="server" Text="Hello2"></asp:Label>
</asp:TableCell>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label6" runat="server" Text="Hello3"></asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label7" runat="server" Text="Hello1"></asp:Label>
</asp:TableCell>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label8" runat="server" Text="Hello2"></asp:Label>
</asp:TableCell>
<asp:TableCell CssClass="trborder">
<asp:Label ID="Label9" runat="server" Text="Hello3"></asp:Label>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:AnimationExtender ID="upaeTopPanel" runat="server" TargetControlID="updPanel" BehaviorID="animation">
<Animations>
<OnUpdated>
<FadeIn Duration="1.5" Fps="30"></FadeIn>
</OnUpdated>
</Animations>
</asp:AnimationExtender>
</div>
</td>
<td></td>
</tr>
</table>
</div>
</form>
And the CSS:
<style type="text/css">
.trborder
{
border: solid 1px #000000;
}
#back
{
background-image: url(Images/mickey.jpg);
background-position: center center;
background-repeat: no-repeat;
}
.style1
{
width: 317px;
}
.style2
{
width: 322px;
}
</style>
I have figured it out how to do it, according to the fadeIn effect described in the Ajax library, the FadeInAnimation performs a fade in from the current opacity to the maximum opacity, so I added a value for that less than 1 (which is the top)
<FadeIn Duration="1.5" Fps="30" MaximumOpacity=".8"></FadeIn>
and it worked.
thanks.
Here is the problem im having. I have 5 buttons on my form that appear next to each other (horizontal). 3 out of the 5 buttons had to be put in an update panel b/c these buttons have to do AsyncPostBack, the other 2 buttons need to be outside to do a postback. Everything works the way I would like accept that all the buttons dont appear on the same line. Is there anything I can do put get these 5 buttons to appear on the same line, given the different functionality of these buttons?
The UpdatePanel renders a <div> you need to style this div so that that it displays inline Notice the Style="display:inline" in the following code. There's other ways to accomplish this depending on your layout but this is the most straightforward.
<asp:UpdatePanel ID="UpdatePanel1" runat="server" Style="display:inline">
<ContentTemplate>
<asp:Label ID="labelText" runat="server" Text="Label" />
<asp:Button ID="Button1" runat="server" Text="Button1" />
<asp:Button ID="Button2" runat="server" Text="Button2" />
<asp:Button ID="Button3" runat="server" Text="Button3" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="Button4" runat="server" Text="Button4" />
<asp:Button ID="Button5" runat="server" Text="Button5" />
You don't have to have your buttons inside the UpdatePanel to make this work. You would simply need to define them as AsyncPostBackTriggers. You don't have to worry about breaking your layout then.
<div class="toolbar">
<asp:Button ID="Button1" runat="server" Text="Button1" />
<asp:Button ID="Button2" runat="server" Text="Button2" />
<asp:Button ID="Button3" runat="server" Text="Button3" />
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="labelText" runat="server" Text="Label" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button3" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="uppnl_Select_File_Format" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="button-bg-2">
<div class="button-text-2">
<asp:LinkButton ID="btnCreate" ValidationGroup="CreateVersion" runat="server" OnClick="btn_Create_OnClick"
CausesValidation="true">Add Title</asp:LinkButton>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnCreate" />
<asp:AsyncPostBackTrigger ControlID="ddlstMedia" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upprogpnl" runat="server" AssociatedUpdatePanelID="uppnl_Select_File_Format">
<ProgressTemplate>
<asp:Image ID="img_Loading" runat="server" ImageUrl="~/App_Themes/Admin/LoadingImages/loading1.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
Loader image is not shown when button click event ...
Please reply me clearly, i'm a beginner......
thisi is the code for showing loader gif in time of processing
<ProgressTemplate>
<div Style="z-index: 105; left: 450px;position: absolute; top: 230px" >
<center>
<img id="imgloader" runat="server" src="images/loading.gif" />
</center>
</div>
</ProgressTemplate>
.