Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI

I have a main multi-view containing a whole lot views which all but one works correctly.
On the faulty view one selects a field which acts as a button, calling up another alias view which allows one to add a record. After adding the record one can return to the first view. if one clicks the button again this time it doesn't bring up the alias view
but encounters a error that the alias multi-view can not be found.

Problem is that the faulty view looks correct , same as the views that work.

I am so stumped with this. Someone please assist

Regards
Nick


What I have tried:

I have traced the code and placed try-catch statements but without results.
Posted
Updated 13-Mar-17 1:57am
Comments
F-ES Sitecore 13-Mar-17 7:44am    
So you want people to help you fix code they can't see?
Member 11427028 13-Mar-17 8:07am    
I have now provided some code under solution 1. There really is a lot of code in the whole multiview.

1 solution

This is the code of the the malfunctioning view. sorry it is so jumbled up



HTML



<asp:View runat="server" ID="streetMasterliasesView"><pre lang="HTML">

<asp:Panel ID="PnlStreetMaster" runat="server" ClientIDMode="Static" class="lm-modal col-md-12 clearfix padding-top-bottom">

<asp:Label ID="lblListOfAMAliases" Text="List of Aliases " runat="server">


<asp:Label ID="lblAddressMasterAliasError" ForeColor="Red" Text="You cannot edit the alias of type OF"
runat="server" Visible="false">


<asp:GridView ID="gvStreetMasterAliases" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" PagerSettings-Mode="NumericFirstLast" PageSize="15"
HTML

ToolTip="Street Aliases" DataKeyNames="ID" DataSourceID="AMAliasesODS"
OnRowCancelingEdit="gvStreetMasterAliases_RowCancelingEdit"
OnRowEditing="gvAddressMasterAlias_OnRowEditing"
OnRowUpdating="gvAddressMasterAlias_OnRowUpdating"
class="table table-bordered table-responsive table-condensed" Width="100%" HeaderStyle-CssClass="text-center background-blue text-white" HeaderStyle-ForeColor="White" >
<PagerSettings Mode="NumericFirstLast" />
<RowStyle BackColor="#F5F5F5" />
<AlternatingRowStyle BackColor="White" /> <EditRowStyle BackColor= "LightBlue" />
<columns> <asp:CommandField ShowEditButton="True" />
<asp:templatefield>
<ItemStyle HorizontalAlign="Left" Width="10%" />
<itemtemplate>
<asp:LinkButton ID="btnAMAliasesResend" runat="server" CommandArgument='<%# Eval("ID")+ ",resend,AM_ALIAS" %>'
CommandName="Select" OnCommand="RowButtonEvent" Text="Resend" Class="LocRegLink" />


<asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" Visible="True" ReadOnly="true"/>
<asp:BoundField DataField="STREET" HeaderText="STREET" SortExpression="STREET" Visible="True" ReadOnly="true"/>
<asp:BoundField DataField="COMPLEX_ALIAS" HeaderText="COMPLEX ALIAS" SortExpression="COMPLEX_ALIAS" />
<asp:TemplateField HeaderText="TYPE" SortExpression="ALIAS_TYPE">
<edititemtemplate>
<asp:DropDownList ID="ddlTypesMAAliases" runat="server" DataSourceID="alisTypeODS"
DataTextField="DESCR" DataValueField="ALIAS_TYPE" SelectedValue='<%# Bind("ALIAS_TYPE") %>'>

C#

<asp:ObjectDataSource ID="alisTypeODS" runat="server" SelectMethod="GetAliasTypes"
TypeName="LocationMan.Administration.DataClasses.LocRegDAL">

<itemtemplate>
<asp:Label ID="lblStreetMasterAlias" runat="server" Text='<%# Bind("ALIAS_TYPE") %>'>


<asp:TemplateField HeaderText="ACTIVE" SortExpression="ACTIVE">
<edititemtemplate>
<asp:DropDownList ID="ddlStreetActiveAlias" runat="server" DataSourceID="activeODS"
DataTextField="ACTIVE" DataValueField="ACT_ID" SelectedValue='<%# Bind("ACTIVE") %>'>

<asp:ObjectDataSource ID="activeODS" runat="server" SelectMethod="GetActiveColumnValues"
TypeName="LocationMan.Administration.DataClasses.LocRegDAL">

<itemtemplate>
<asp:Label ID="lblStreetMasterActiveAlias" runat="server" Text='<%# Bind("ACTIVE") %>'>


<asp:BoundField DataField="STR_NUM" HeaderText="STR NUM" SortExpression="STR_NUM" />
<asp:BoundField DataField="LAT" HeaderText="LAT" SortExpression="LAT" InsertVisible="False"
ReadOnly="True" />
<asp:BoundField DataField="LON" HeaderText="LON" SortExpression="LON" ReadOnly="True"/>
<asp:BoundField DataField="DIRECTION" HeaderText="DIRECTION" SortExpression="DIRECTION" />
<asp:BoundField DataField="MODIFIED_BY" HeaderText="LAST MODIFIED BY" InsertVisible="False"
ReadOnly="True" SortExpression="MODIFIED_BY" Visible="True" />

<asp:ObjectDataSource ID="AMAliasesODS" runat="server" SelectMethod="GetAddressMasterAliases"
TypeName="LocationMan.Administration.DataClasses.LocRegDAL" UpdateMethod="UpdateAddressMasterAlias"
OnUpdated="AMAliasesODS_Updated" OnUpdating="streetmasterODS_Updating">
<updateparameters>
<asp:Parameter Name="ID" Type="String" />
<asp:Parameter Name="STR_NUM" Type="String" />
<asp:Parameter Name="COMPLEX_ALIAS" Type="String" />
<asp:Parameter Name="DIRECTION" Type="String" />
<asp:Parameter Name="ACTIVE" Type="String" />
<asp:Parameter Name="ALIAS_TYPE" Type="String" />
<asp:Parameter Name="MODIFIED_BY" Type="String" />

<selectparameters>
<asp:SessionParameter Name="amID" SessionField="aAM_ID" Type="String" />


 



<%-- <asp:LinkButton ID="lbtnAddAMAlias" runat="server" class="btn btn-primary col-xs-12 col-md-2 col-sm-3 btn-info pull-right" Text="Add New" OnClick="lbtnAddAMAlias_Click">--%>
<asp:LinkButton ID="lbtnAddAMAlias" runat="server" class="btn btn-primary col-xs-12 col-md-2 col-sm-3 btn-info pull-right" onclick="lbtnAddAMAlias_Click"> Add New
<asp:LinkButton ID="btnStreetMasterCancel" ClientIDMode="Static" runat="server" class="btn btn-primary col-xs-12 col-md-2 col-sm-3 btn-info pull-right"> Cancel


<ajaxToolkit:ModalPopupExtender ID="StreetMasterModalPopupExtender" runat="server" PopupControlID="PnlStreetMaster"
DropShadow="true" BackgroundCssClass="modalBackground" Enabled="True" TargetControlID="btnHidden" CancelControlID="btnStreetMasterCancel">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900