A way to display ASP.NET Wizard navigation controls on top - asp.net

I have an asp.net wizard and I want the navigation controls (the next/previous buttons) to appear at the top instead of the bottom of the wizard.
Is there a simple way to set the location of the navigation area in the Wizard?
Or will I have to resort to have empty StartNavigationTemplate, StepNavigationTemplate, FinishNavigationTemplate so that standard navigation controls won't show, and then add div elements with custom buttons for the navigation?
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Width="95%" DisplaySideBar="False"
FinishCompleteButtonType="Link" FinishPreviousButtonType="Link" StartNextButtonType="Link"
StepNextButtonType="Link" StepPreviousButtonType="Link" OnActiveStepChanged="Wizard1_ActiveStepChanged"
OnNextButtonClick="Wizard1_NextButtonClick"
OnFinishButtonClick="Wizard1_FinishButtonClick">
<HeaderStyle HorizontalAlign="Center" Font-Bold="True" />
<HeaderTemplate>
Edit User Wizard
<br />
<br />
<div style="text-align:left">
<asp:Label ID="lblStepTitle" runat="server" Text="Step Title"></asp:Label>
</div>
</HeaderTemplate>
<StartNavigationTemplate>
</StartNavigationTemplate>
<StepNavigationTemplate>
</StepNavigationTemplate>
<FinishNavigationTemplate>
</FinishNavigationTemplate>
<WizardSteps>
</WizardSteps>
</asp:Wizard>

Here's a way I found to re-arrange the wizard areas relative to each other, using LayoutTemplate element and asp:PlaceHolder control for each wizard area (header, sidebar, step, navigation); only thing I had to do was moving the navigationPlaceHolder above the headerPlaceHolder; now navigation controls appear at the top of the wizard, which what I wanted.
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Width="95%" DisplaySideBar="False"
FinishCompleteButtonType="Link" FinishPreviousButtonType="Link" StartNextButtonType="Link"
StepNextButtonType="Link" StepPreviousButtonType="Link" OnActiveStepChanged="Wizard1_ActiveStepChanged"
OnNextButtonClick="Wizard1_NextButtonClick"
OnFinishButtonClick="Wizard1_FinishButtonClick">
<HeaderStyle HorizontalAlign="Center" Font-Bold="True" />
<LayoutTemplate>
<asp:PlaceHolder ID="navigationPlaceHolder" runat="server"/>
<asp:PlaceHolder ID="headerPlaceHolder" runat="server" />
<asp:PlaceHolder ID="sideBarPlaceHolder" runat="server" />
<asp:PlaceHolder ID="WizardStepPlaceHolder" runat="server" />
</LayoutTemplate>
<HeaderTemplate>
Edit User Wizard
<br />
<br />
<div style="text-align:left">
<asp:Label ID="lblStepTitle" runat="server" Text="Step Title"></asp:Label>
</div>
</HeaderTemplate>
<WizardSteps>
</WizardSteps>
</asp:Wizard>

Related

Why some div content is missing from ZoneTemplate in asp.net webpart?

Here is my code:
<asp:WebPartZone ID="Zone1" runat="server" Width="100%" PartChromeType="None" Padding="0" PartStyle-CssClass="NoPadding"
PartStyle-BackColor="Transparent" BackColor="Transparent" PartChromeStyle-BackColor="Transparent">
<PartStyle BackColor="Transparent"></PartStyle>
<CloseVerb Visible="false" />
<MinimizeVerb Visible="false" />
<ZoneTemplate>
<div class="demo">
<p>Procedure Queues</p>
</div>
<div class="demoBottom">
<div class="divPortletContent">
<br />
<asp:DataList ID="dlProcedureQueues" runat="server" >
<ItemTemplate>
<asp:HyperLink ID="lbProcedureQueues" runat="server" Text='<%# Eval("site_nm") %>' NavigateUrl='<%# Eval("site_url") %>' />
</ItemTemplate>
</asp:DataList>
</div>
</div>
</ZoneTemplate>
</asp:WebPartZone>
The text from <div class="demo"><p>Procedure Queues</p></div> is miising and it works if I put it outside of webpart. Also, I am loosing all the css styles when placed inside webpart's ZoneTemplate.
Any ideas?? Thanks in advance.
Let me answer my own question. From what I found out, ZoneTemplate only considers the asp controls (including user controls) as web parts and ignores all the html.

how to select last page on a radlistview datapager

I have a radlistview which has the datapager enabled...
But when I launch the website it currently loads the first datapage on the listview (i.e the first page of comments). Is there a way to change this so that it opens the last page?
Here is the current radlistview...
<telerik:RadListView ID="RadListViewComments" runat="server" AllowPaging="True" DataKeyNames="ID" DataSourceID="SqlDataSourceComments" PageSize="5">
<LayoutTemplate>
<div class="RadListView RadListViewFloated RadListView_Default">
<div class="rlvFloated rlvAutoScroll">
<div id="itemPlaceholder" runat="server">
</div>
</div>
<telerik:RadDataPager ID="RadDataPager1" runat="server">
<Fields>
<telerik:RadDataPagerButtonField FieldType="Numeric" />
</Fields>
</telerik:RadDataPager>
</div>
<ItemTemplate>
<div class="rlvI" style="width: 700px; margin-bottom: 50px" margin-right: 100%>
<asp:Label ID="ownerLabel" runat="server" Text='<%# Eval("owner") %>' /> &nbsp - &nbsp
<asp:Label ID="dateLabel" runat="server" Text='<%# Eval("commentdate")%>' />
<br />
<asp:Label ID="commentLabel" runat="server" Text='<%# Eval("comment") %>' />
</div>
</ItemTemplate>
<EmptyDataTemplate>
<div class="RadListView RadListView_Default">
<div class="rlvEmpty">
There are no previous comments.</div>
</div>
</EmptyDataTemplate>
</telerik:RadListView>
Thanks
In the code-behind you can fire a command event with the "Last" argument on PageLoad to force it to go to the last page.
See
how change the RadDataPager Page# From CodeBehind (server-side)
http://www.telerik.com/help/aspnet-ajax/datapager-overview.html

Click on asp:button inside modal popup doesn't work on Win7 x64 platform

I am developing ASP.NET application and I have a modal popup dialog with asp:button on it. I was developing my application on Windows 7 x86 platform, and there, click on this button works fine. But when I deploy the exact same code on Windows 7 x64 platform, click on this button inside modal popup doesn't work. Does anybody have idea what am I missing?
This is the Panel that I am showing and ModalPopupExtender that I use to show it.
<asp:ModalPopupExtender runat="server" ID="Extender_ConfirmChange"
PopupControlID="Panel_ConfirmChange"
TargetControlID="HiddenFieldChange"
BackgroundCssClass="modalBackground"
Drag="True"
PopupDragHandleControlID="LegendChange"
OkControlID="BtnYes_ConfirmChange"
CancelControlID="BtnNo_ConfirmChange"
DynamicServicePath="" Enabled="True">
</asp:ModalPopupExtender>
<asp:HiddenField ID="HiddenFieldChange" runat="server" />
<asp:Panel runat="server" ID="Panel_ConfirmChange" Height="100px" Width="400px" style="display: none">
<div id="Div1" runat="server" class="UserData">
<fieldset class='UserPanel'>
<legend id="LegendChange" class="CursorCorrector">
<asp:Label ID="LabelChange" runat="server" meta:resourcekey="ChangeResource"></asp:Label>
</legend>
<asp:Panel runat="server" BackColor="White" >
<asp:Table runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:Image ID="img" ImageUrl="../Images/Shield_Yellow32.png" runat="server"
meta:resourcekey="imageChangeResource" style="padding-right:8px"/>
</asp:TableCell>
<asp:TableCell>
<asp:Label ID="lblChange" runat="server" meta:resourcekey="lblChangeResource" ></asp:Label>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<br />
<br />
<div class="button">
<asp:Button ID="BtnYes_ConfirmChange" runat="server"
OnClick="BtnYes_ConfirmChange_OnClientClick" UseSubmitBehavior="False"
Width="70px" meta:resourcekey="BtnYes_ConfirmChangeResource"/>
<asp:Button ID="BtnNo_ConfirmChange" runat="server" Width="70px"
OnClick="BtnNo_ConfirmChange_OnClientClick"
meta:resourcekey="BtnNo_ConfirmChangeResource"/>
<asp:Button ID="BtnCancel_ConfirmChange" runat="server" Width="70px"
OnClick="BtnCancel_ConfirmChange_OnClientClick"
meta:resourcekey="BtnCancel_ConfirmChangeResource"/>
</div>
</asp:Panel>
</fieldset>
</div>
</asp:Panel>

how to stop refreshing of current page when any server side event of web user control being fired

I'm building a web user control.
Now i need to fire some server side events on web user control.
And also need to stop page refreshing.
Can any one tell me how can i fire server side event on web user control without refreshing hole page.
Edit-1
My control (.ascx)
<%--Control designer start--%>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div style="position:relative;border:none;" id="divComboContainer" runat="server" >
<%--Hidden fields for datacombo values--%>
<asp:HiddenField ID="Hidden_Value" Value="" runat="server" />
<asp:HiddenField ID="Hidden_SorDir" Value="" runat="server" />
<asp:HiddenField ID="Hidden_RowIndex" Value="" runat="server" />
<asp:HiddenField ID="hfScrollPosition" Value="" runat="server" />
<%--Seleted text display textbox--%>
<asp:TextBox ID="txtDisplay" runat="server" CssClass="tb10" autocomplete="off" ToolTip="Type for search"></asp:TextBox>
<%--Panal and controls for dropdown--%>
<asp:Panel ID="DropPanel" runat="server" CssClass="ContextMenuPanel" Width="1000px"
style="display :none;
visibility: hidden;
border:2px solid #E5E5E5;
padding-bottom:-1px;
margin-top:-28px;
background-color:#83ACF3;
overflow:hidden;
height:auto;
max-height:700px;
max-width:1000px;">
<%--<asp:Button ID="Button1" runat="server" Text="Button" />--%>
<%--Search textbox div--%>
<div class="ddeSerch">
<div style="padding-top:5px;float:left;">
Look-Up
</div>
<asp:TextBox runat="server" ID="txtSearch" autocomplete="off" CssClass="tb10" BackColor="White" Width="50%" MaxLength="150"
onclick="return false;"
style="background: url(GridViewCSSThemes/Images/tia.png) no-repeat top right;background-color:White;padding-right:25px;">
</asp:TextBox>
<div style="padding-top:5px;float:right;cursor:pointer;" runat="server" id="dcmbClose" >
Close
</div>
</div>
<%--Datacombo header--%>
<asp:Table ID="Table1" runat="server" CssClass="header" GridLines="Vertical" Width="100%">
</asp:Table>
<%--Datacombo body(records)--%>
<div id="divGrid" runat="server" style="max-height:615px;width:100%;overflow-X:auto;overflow-Y:auto;">
<asp:GridView ID="gridEdit" GridLines="Vertical" runat="server" Width="100%"
ShowFooter="false" AutoGenerateColumns="false" ShowHeader="false" AllowSorting="true"
Font-Size = "11pt" Font-Names = "Arial" style="color:Black;"
AlternatingRowStyle-BackColor="#CCDDFB"
RowStyle-BackColor="WhiteSmoke"
OnRowCreated="gridEdit_RowCreated" OnRowDataBound="gridEdit_RowDataBound" OnSorting="gridEdit_Sorting">
<HeaderStyle HorizontalAlign="Left" CssClass="header" Font-Bold="false" />
<RowStyle CssClass="rowstyle"/>
<Columns>
</Columns>
</asp:GridView>
</div>
<%--Datacombo footer--%>
<table class="footer" id="tblfooter" runat="server">
<tr>
<td style="text-align:left;">
<asp:TextBox Enabled="false" autocomplete="off" ID="lblOrd" CssClass="footer" runat="server" Width="100%"></asp:TextBox>
</td>
<td style="text-align:right;">
<asp:TextBox Enabled="false" autocomplete="off" ID="lblTot" CssClass="footer" style="text-align:right;" runat="server" Width="100%"></asp:TextBox>
</td>
</tr>
</table>
</asp:Panel>
<ajaxToolkit:DropDownExtender runat="server" ID="DDE"
TargetControlID="txtDisplay"
DropDownControlID="DropPanel" HighlightBorderColor="Transparent">
</ajaxToolkit:DropDownExtender>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Use on aspx page
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<uc1:UCDataCombo runat="server" ID="UCDataCombo4"/>
</ContentTemplate>
</asp:UpdatePanel>
When user clicks on header of gridview it fires some events.
And hole page got refreshed.
I need to stop refreshing of hole page.
UpdatePanel enables sections of a page to be partially rendered without a postback.
You can have a full understanding by reading here.
-EDIT-
I don't if this will help but you gotta try this:
Check if is set in your web.config, if it is there you may want to remove it.
Go to this link for more details.
Hope it helps!
Problem i solved by setting clientIDMode to Static.
clientIDMode="Static".
Now update panel works fine.

web part footer does not appear

the web part footer does not appear in a webpart like this
<asp:WebPartZone ID="WebPartZone1" runat="server" style="height:100px;" CssClass="PartZone" PartChromeType="TitleAndBorder" ShowTitleIcons="true" Width="200">
<FooterStyle CssClass="PartFooterStyle" />
<PartTitleStyle CssClass="PartTitleStyle" />
<ZoneTemplate>
<asp:Panel ID="Panel2" runat="server" Width="200" Height="200">
<asp:Button ID="Button1" runat="server" Text="Button" />
</asp:Panel>
</ZoneTemplate>
</asp:WebPartZone>
what is wrong with this ?
thanks
Well I believe it's a bug cause it does not appear at any condition.

Resources