Certain controls won't get generated in aspx.designer.cs-file - c#

I have a weird problem. I can't access some of my server controls from my codebehind. I've looked around and can only find answers for situations where you can't find ANY controls and I've tried all solutions I've found here on stack. re-creating designer file, deleting temp data, renaming controls etc. Nothing works.
The weird thing is that I can access every controller I put outside my ListView element. But everything inside will not get generated in my aspx.designer.cs file.
Code:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMid" runat="server">
<h2><asp:Label ID="LabelCat" runat="server" Text=""></asp:Label></h2>
<asp:HiddenField ID="HiddenFieldID" runat="server" />
<br />
<div class="list-group">
<asp:ListView ID="ListViewSearch" runat="server" DataSourceID="SqlDataSourceWebsite" DataKeyNames="WebsiteID">
<EmptyDataTemplate>
<table runat="server">
<tr>
<td>Darn</td>
</tr>
</table>
</EmptyDataTemplate>
<ItemTemplate>
<td>
<div class="row list-group-item">
<div class="">
<%# Eval("url") %>
</div>
<div class="col-xs-5">
<div class="pull-left">
<div>
<asp:LinkButton ID="BtnUp" runat="server" CssClass="btn btn-default btn-xs" CommandArgument='<%# Eval("websiteId").ToString() %>' OnClick="up_click"><i class="fa fa-chevron-up" style="color:green"></i></asp:LinkButton>
</div>
<div>
<asp:LinkButton ID="BtnDown" runat="server" CssClass="btn btn-default btn-xs" CommandArgument='<%# Eval("websiteId").ToString() %>' OnCommand="down_click"><i class="fa fa-chevron-down" style="color:red"></i></asp:LinkButton>
</div>
</div>
<div class="lbl-score">
<asp:Label ID="LabelScore" runat="server" Text="Score: "></asp:Label>
<asp:ScriptManagerProxy ID="ScriptManagerProxySearch" runat="server"></asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="LabelRating" runat="server" Text=' <%# Eval("rating") %>'></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnUp" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
<div class="lbl-desc">
<asp:Label ID="LabelDesc1" runat="server" Text=' <%# Eval("Description1") + " | "%> '></asp:Label>
<asp:Label ID="LabelDesc2" runat="server" Text=' <%# Eval("Description2") %> '></asp:Label>
</div>
</div>
</td>
</ItemTemplate>
</asp:ListView>
</div>
<asp:SqlDataSource ID="SqlDataSourceWebsite" runat="server" ConnectionString="<%$ ConnectionStrings:WDBAPPConnectionString %>" SelectCommand="SELECT * FROM [Website] WHERE ([categoryId] = #HFID)">
<SelectParameters>
<asp:ControlParameter ControlID="HiddenFieldID" Name="HFID" Type="Int32" DefaultValue="0" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>
I know there is a lot of code but basically the controls "LabeCat", "HiddenFieldID", "ListViewSearch" and "SqlDataSourceWebsite" show up in my aspx.designer.cs-file, but no other controls do, in other words; all controls before and after my ListView work fine. What could be wrong here? So confused.

Related

Open a modal with a text area to fill and a text area loading some content from the page

I'm working with WebForms and I need to create a modal, or anything like this on click on a button to reject an item, the modal should show the item ID and a text area to fill up with the reason why this item will be rejected.
I'm on it for about one week and I can't figure out how could I get the item id and put it on the modal.
I've never used WebForms before, and I'm not finding anything that helps me.
this is my modal code:
<asp:Panel ID="pnlMotivoRejeitarTitulo" runat="server" Width="610px">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Button runat="server" ID="btnShowModalPopup2" Style="display: none" />
<ajaxToolkit:ModalPopupExtender ID="modalRejeitarTitulo" runat="server" TargetControlID="btnShowModalPopup2"
PopupControlID="divPopUp2" BackgroundCssClass="popUpStyle" PopupDragHandleControlID="panelDragHandle"
DropShadow="true" RepositionMode="RepositionOnWindowResize" />
<div class="popUpStyle" id="divPopUp2" style="display: none;">
<div style="width: 600px; max-height: 160px;">
<asp:Panel runat="Server" ID="panel1" CssClass="drag01">
<asp:Label ID="lblTituloModal" runat="server" Text="EXCLUIR TÍTULO?"></asp:Label>
<br />
</asp:Panel>
<div class="subtitulo">
<asp:Label ID="lblMensagemOrigemAgregadoMiudo" runat="server" Text=""></asp:Label>
</div>
<br />
<asp:Panel ID="pnlRejeitarTitulo" runat="server" Width="550px" BackColor="#CCCCCC"
CssClass="centralizaPanel" BorderStyle="Outset">
<div style="padding-top: 10px;">
<div class="campo">
<div class="label_formulario8">
<asp:Label ID="lblId" runat="server" Text="ID: "></asp:Label>
</div>
<asp:TextBox ID="txtId" runat="server" Width="100px" ReadOnly="true"></asp:TextBox>
</div>
<div class="campo">
<div class="label_formulario8">
<asp:Label ID="Label3" runat="server" Text="Descrição: "></asp:Label>
</div>
<asp:TextBox ID="txtDescricao" runat="server" Width="300px"></asp:TextBox>
</div>
<br />
</div>
<div class="centraliza_botao">
<asp:Button ID="btnConfirmarExcluirTitulo" runat="server" Text="Confirmar" CssClass="btn btn-primary" OnClick="btnConfirmarExcluirTitulo_Click"
Style="height: 31px" CausesValidation="false" />
<asp:Button ID="btnFecharExcluirTitulo" runat="server" Text="Fechar" CssClass="btn btn-warning"
Style="height: 31px" CausesValidation="false" OnClick="btnFecharExcluirTitulo_Click" />
</div>
<br />
</asp:Panel>
</div>
<br />
<br />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
on txtId must appear the item ID, I've tried to use JS getting the id of the rendered input, but it take so long to render, so JS does not work.
I figured out that I had to fill all the fields before call the method that shows the modal dialog.
I was thinking like jQuery but it does work like that on WebForms

UpdatePanel AsyncPostBackTrigger does Postback

I've below design code containing updatepanel to the gridview and buttons as shown below -
<asp:ScriptManager ID="scrptmanager" runat="server"></asp:ScriptManager>
<div>
<asp:HiddenField ID="hdnSortValue" runat="server" />
</div>
<div class="current-btns" style="float: left !important;">
<div id="divFitnessSortBy" runat="server" class="fit-sort">
<table>
<tr>
<td>
<b>Sort by :</b>
</td>
<td>
<asp:Button ID="btnMostRecent" Text="Most Recent" class="button action sortcomments"
runat="server" OnCommand="btnMostRecent_Click" CommandArgument="date" />
</td>
<td>
<asp:Button ID="btnMostViewed" Text="Most Viewed" class="Comments" runat="server"
OnCommand="btnMostViewed_Click" CommandArgument="views" />
</td>
</tr>
</table>
</div>
<div class="clear">
</div>
</div>
<div class="hr">
</div>
<div class="BlogsPostHolderDiv" id="divPagination">
<asp:UpdatePanel ID="updtpanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvBlogsPost" runat="server" DataKeyNames="PostID" AutoGenerateColumns="False"
AllowPaging="false" Width="100%" OnRowDataBound="gvBlogsPost_Bound" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<div class="current-articles">
<div class="current-thumb">
<a id="lnkThumbnail" runat="server" rel="nofollow">
<asp:Image ID="imgThumbnail" runat="server" Height="135px" Width="186px" />
</a>
</div>
<div class="current-list">
<h2>
<a id="lnkArticle" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Subject")%></a>
</h2>
<div class="views-comments">
<h5>
<asp:Label runat="server" ID="lblNewsletterDate" ForeColor="#808080"><%# DataBinder.Eval(Container.DataItem, "PostDate")%></asp:Label>
<span class="gray">|</span> <span id="spnViews" runat="server"><span>
<%#Convert.ToInt64(DataBinder.Eval(Container.DataItem, "TotalViews")).ToString("#,#")%>
Views </span></span>
</h5>
</div>
<asp:Label ID="lblShortDescription" runat="server"><%#DataBinder.Eval (Container.DataItem, "Body")%> </asp:Label>
</div>
<div class="clear">
</div>
</div>
<div class="hr">
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnMostRecent" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="btnMostViewed" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<input type="hidden" id="hdnLastArticle" value="10" />
When i click on btnMostRecent or btnMostViewed the page does postback which should not be the case...am i missing something here?
Expected - When i click on any of the given button only gvBlogsPost gridview should be updated without the whole page postback
Help and thanks in advance...!
It looks the only thing you have to do is make sure the triggers are in the same naming container.
According to MSDN:
The control that the AsyncPostBackTrigger control references must be
in the same naming container as the update panel for which it is a
trigger. Triggers that are based on controls in other naming
containers are not supported.

Button event doesn't fire inside Update panel

I have a asp.net web form Page which uses master page also.
This is a simple page which displays some text and has a form, this page also allows user to upload resume in .doc, .docx & pdf format.
Problem with this code is that i am not able to trigger
for some reason <asp:Button ID="btnUploadCV" runat="server" Text="Upload" CssClass="btnUpload" onclick="btnUploadCV_Click"/>
<%# Page Title="" Language="C#" MasterPageFile="~/en/SiteMasterPage.master" AutoEventWireup="true" CodeFile="career.aspx.cs" Inherits="career" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<!-- Content Page-->
<!-- page content wrapper -->
<div id="page-content-area" class="page-content-area">
<div id="pg-left-bar" class="pg-left-bar">
<div class="page-title">
<h5><asp:Label ID="lblPageTitle" CssClass="page-title-lbl" runat="server" Text="Introduction"></asp:Label></h5>
</div>
<div class="page-text">
<asp:Label ID="lblPageContents" runat="server" Text=""></asp:Label>
</div>
<div class="career-form-wrapper">
<!-- UpdatePanel -->
<asp:UpdatePanel ID="updPnlArticles" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="pnlCareerForm" runat="server">
<div class="row-form">
<div class="row-lbl-wrapper"> <span class="row-req">*</span>
<asp:Label ID="lblFirstName" runat="server" CssClass="row-label" Text="First Name:"></asp:Label>
</div>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="row-input"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfFN" runat="server" ValidationGroup="Careers" ErrorMessage="*" CssClass="row-validate" ControlToValidate="txtFirstName"></asp:RequiredFieldValidator>
</div>
<div class="row-form">
<div class="row-lbl-wrapper"> <span class="row-req">*</span>
<asp:Label ID="lblFamilyName" runat="server" CssClass="row-label" Text="Family Name:"></asp:Label>
</div>
<asp:TextBox ID="txtFamilyName" runat="server" CssClass="row-input"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfLN" runat="server" ValidationGroup="Careers" ErrorMessage="*" CssClass="row-validate" ControlToValidate="txtFamilyName"></asp:RequiredFieldValidator>
</div>
<div class="row-form">
<div class="row-lbl-wrapper"> <span class="row-req">*</span>
<asp:Label ID="lblEmail" runat="server" CssClass="row-label" Text="Email:"></asp:Label>
</div>
<asp:TextBox ID="txtEmail" runat="server" CssClass="row-input"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvEmail" runat="server" ValidationGroup="Careers" ErrorMessage="*" CssClass="row-validate" ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revEmail" runat="server" ErrorMessage="*" CssClass="row-validate" ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="Careers"></asp:RegularExpressionValidator>
</div>
<div class="row-form">
<div class="row-lbl-wrapper">
<asp:Label ID="lblPhone" runat="server" CssClass="row-label" Text="Phone Number:"></asp:Label>
</div>
<asp:TextBox ID="txtPhone" runat="server" CssClass="row-phone" Text=""></asp:TextBox>
<asp:RegularExpressionValidator ID="revPhone" runat="server" ErrorMessage="*" ValidationGroup="Careers" ControlToValidate="txtPhone" ValidationExpression="^([\+]?[0-9]{1,3}[\s.-][0-9]{1,12})([\s.-]?[0-9]{1,4}?)$"></asp:RegularExpressionValidator>
<div class="tooltip tooltip-override" title="Accepts local format (eg. 04 1234567, 050 1234567 or 04-1234567, 050-1234657)<br />and international format (eg. +971 41234567, +971-41234567 ).<br />Also accepts an optional extention of up to four digits (eg. 04 1234567 289 or +974 41234567 289)">
<asp:Image ID="imgtooltip" CssClass="tooltip-img" runat="server" ImageUrl="~/images/tooltipgreen.png" />
</div>
</div>
<div class="row-form">
<div class="row-lbl-wrapper">
<asp:Label ID="lblFax" runat="server" CssClass="row-label" Text="Fax Number:"></asp:Label>
</div>
<asp:TextBox ID="txtFax" runat="server" CssClass="row-input"></asp:TextBox>
<asp:RegularExpressionValidator ID="revFax" runat="server" ErrorMessage="*" ValidationGroup="Careers" ControlToValidate="txtFax" ValidationExpression="^([\+]?[0-9]{1,3}[\s.-][0-9]{1,12})$"></asp:RegularExpressionValidator>
<div class="tooltip tooltip-override" title="Accepts local format (eg. 04 1234567 or 040-1234567)<br />and international format (eg. +974 41234567 or +974-41234567)">
<asp:Image ID="Image1" CssClass="tooltip-img" runat="server" ImageUrl="~/images/tooltipgreen.png" />
</div>
</div>
<div class="row-form">
<div class="row-lbl-wrapper">
<asp:Label ID="lblAddress" runat="server" CssClass="row-label" Text="Address:"></asp:Label>
</div>
<asp:TextBox ID="txtAddress" runat="server" CssClass="row-input-multiline" TextMode="MultiLine"></asp:TextBox>
</div>
<div class="row-form">
<div class="row-lbl-wrapper"> <span class="row-req">*</span>
<asp:Label ID="lblCountry" runat="server" CssClass="row-label" Text="Country:"></asp:Label>
</div>
<asp:DropDownList ID="ddCountry" runat="server" CssClass="row-dd"></asp:DropDownList>
<asp:CascadingDropDown ID="csdCountry" runat="server" Category="Country" TargetControlID="ddCountry" PromptText="-- Select --" LoadingText="[Loading Countries...]" ServiceMethod="FetchCountries" ServicePath="~/wsCountryCity.asmx" PromptValue="0"></asp:CascadingDropDown>
<asp:RequiredFieldValidator ID="rfCountry" ValidationGroup="Careers" ControlToValidate="ddCountry" CssClass="row-validate" InitialValue="0" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
</div>
<div class="row-form">
<div class="row-lbl-wrapper">
<asp:Label ID="lblCity" runat="server" CssClass="row-label" Text="City:"></asp:Label>
</div>
<asp:DropDownList ID="ddCity" runat="server" CssClass="row-dd"></asp:DropDownList>
<asp:CascadingDropDown ID="csdCity" runat="server" Category="City" TargetControlID="ddCity" ParentControlID="ddCountry" PromptText="-- Select --" LoadingText="[Loading Cities...]" ServiceMethod="FetchCities" ServicePath="~/wsCountryCity.asmx" PromptValue="0"></asp:CascadingDropDown>
</div>
<div class="row-form">
<div class="row-lbl-wrapper"> <span class="row-req">*</span>
<asp:Label ID="Label1" runat="server" CssClass="row-label" Text="CV:"></asp:Label>
</div>
<asp:FileUpload ID="FileUpload1" runat="server" CssClass="fileUpload" />
<div id="dFileUpload1" class="btnUploadHack">Browse</div>
<asp:Button ID="btnUploadCV" runat="server" Text="Upload" CssClass="btnUpload" onclick="btnUploadCV_Click" />
<asp:RequiredFieldValidator ID="rfvF1" runat="server" ValidationGroup="Careers" ErrorMessage="*" CssClass="row-validate" ControlToValidate="FileUpload1"></asp:RequiredFieldValidator>
<asp:Label ID="lblImageMSG" runat="server" Text=""></asp:Label>
</div>
<div class="contactus-row">
<asp:Button ID="btnSave" runat="server" CssClass="btnContactUsSave" Text="Send Message" onclick="btnSave_Click" ValidationGroup="Careers" />
</div>
</asp:Panel>
<asp:Panel ID="pnlCareerMSG" runat="server"></asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<!-- UpdatePanel -->
</div>
</div>
<div class="pg-right-bar">
<asp:Image ID="imgSideBanner" runat="server" />
</div>
</div>
<!-- page content wrapper -->
<!-- Content Page-->
</asp:Content>
Code Behind
protected void btnUploadCV_Click(object sender, EventArgs e)
{
// code is here
}
So far i am not able to figure out what i s blocking the any button inside from firing. Yes i did even put a simple button to test even that didn't fire.
I am not sure if it is Validation or Update Panel which is creating problem.
You need to add Triggers after ContentTemplate in Update panel.
<Triggers>
<asp:PostBackTrigger ControlID="btnexport" />
</Triggers>
The required field validators are probably biting you.Just add the property 'causes validation="false" ' to your button and it will fire.You can handle the validation server side using if Page.IsValid
<asp:Button ID="btnUploadCV" runat="server" Text="Upload" CssClass="btnUpload" onclick="btnUploadCV_Click" CausesValidation="false" />
Server Side
protected void btnUploadCV_Click(object sender, EventArgs e)
{
Page.Validate();
if (Page.IsValid == true)
{
// your code here
}
}
Update
I am not sure what is happening with your button.Then if all fails do a brute force attack to cause the post back like this.
<asp:Button ID="btnUploadCV" runat="server" Text="Upload" CssClass="btnUpload" onclick="btnUploadCV_Click" CausesValidation="false" onClientClick='forcePostBack()" />
**Javascript**
function forcePostback(){
__doPostBack('<%#btnUploadCv.UniqueID %>','');
}

Getting database ID of objects in ListView and updating ListView from user control ListView

I am creating a website and am facing the following problem. I have 2 ListViews.
The first ListView is inside a user control called Sidebar.ascx:
<asp:ListView ID="sidebarListView" runat="server" DataKeyNames="Id" DataSourceID="SqlDataSourceSidebar">
<ItemTemplate>
<div class="sidebarItem" runat="server">
<div>
<asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
</div>
</div>
</ItemTemplate>
<LayoutTemplate>
<div class="sidebarMain">
<asp:PlaceHolder runat="server" ID="itemPlaceHolder" />
</div>
</LayoutTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSourceSidebar" runat="server" ConnectionString="<%$ ConnectionStrings:TudengiDBConnectionString %>" SelectCommand="SELECT [Id], [Name] FROM [Faculties] ORDER BY [Name]"></asp:SqlDataSource>
It has to display only the name.
The second listview is inside my Default.aspx
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:ListView ID="RecentItemsListView" runat="server" DataSourceID="SqlDataSource1"
GroupItemCount="3">
<LayoutTemplate>
<div class="recentItemsMain">
<asp:PlaceHolder runat="server" ID="groupPlaceHolder" />
</div>
<asp:DataPager ClientIDMode="Static" ID="DataPager1" runat="server" PageSize="9">
<Fields>
<asp:NumericPagerField />
</Fields>
</asp:DataPager>
</LayoutTemplate>
<GroupTemplate>
<div class="recentItems">
<asp:PlaceHolder runat="server" ID="itemPlaceHolder" />
</div>
</GroupTemplate>
<ItemTemplate>
<div class="recentItem" runat="server">
<div>
<asp:Image ID="PictureThumb" runat="server" ImageUrl='<%#CreateThumbnail((string)Eval("Picture"),130,130) %>' />
</div>
<asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
<div>
<asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
</div>
</div>
</ItemTemplate>
<GroupSeparatorTemplate>
<div class="groupSeparator">
</div>
</GroupSeparatorTemplate>
</asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TudengiDBConnectionString %>" SelectCommand="SELECT [Id], [Name], [Faculty_Id], [User_Id], [Author], [Picture], [Location] FROM [Books] ORDER BY [DateAdded] DESC">
What I need is for the ListView in Default.aspx to display the data without a WHERE clause, but when an item is clicked in the Sidebar user control I need to update the Default.aspx ListView to display only the data where the [Faculty_Id] = the ID of the ListView item in the user control.
How can I get the database ID of the ListView object when I can only display the NAME field? Do I have to display the ID as well and then hide the column from users?
What is the correct way to solve a situation like this?
Thanks for helping
<asp:ListView ID="sidebarListView" runat="server" DataKeyNames="Id" DataSourceID="SqlDataSourceSidebar" OnItemCommand="sidebarListView_ItemCommand">
<ItemTemplate>
<div class="sidebarItem" runat="server">
<div>
<asp:LinkButton ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' CommandName="Select" CommandArgument='<%# Eval("Id") %>' />
</div>
</div>
</ItemTemplate>
This is what I ended up with.
Add a hidden-field to your item-template to hold the database ID.
<ItemTemplate>
<asp:HiddenField ID="hdnFacultyID" runat="server" Value='<%# Eval("FacultyID") %>' />
<div class="recentItem" runat="server">
...
</div>
</ItemTemplate>
In the appropriate ListView handlers, you can access the database ID something like this.
((HiddenField)e.item.FindControl("hdnFacultyID")).Value
What you can do is to add an attribute to the NameLabel control.
Call it for example myID:
<asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' myID='<%# Eval("ID") %>'/>
then access that attribute from your code to get your ID:
string ID = NameLabel.Attributes["myID"];

Nestled UpdatePanels causes full page postback

I'm having issues with nestled, custom user controls that causes full page postbacks despite being encapsulated by an UpdatePanel.
The update panel:
<asp:Content ID="mainContentPane" ContentPlaceHolderID="mainContent" runat="server">
<asp:ScriptManager ID="smNetAjax" runat="server" />
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="pnlAssetTabView">
<ContentTemplate>
<custom:AssetTabView runat="server" ID="tvAddAssets" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
The AssetTabView-control:
<custom:TabView runat="server" ID="tvTabView" OnSelectedTabChanged="tvTabView_SelectedTabChanged" />
<custom:AssetList runat="server" ID="dalAssetList" />
And finally the TabView whose links causes full page postback:
<SelectedItemTemplate>
<div class="tab current">
<div class="left"></div>
<asp:LinkButton ID="ExtendedLinkButton1" runat="server"><span><%# DataBinder.Eval(Container.DataItem, "HeaderText") %></span></asp:LinkButton>
<div class="right"></div>
</div>
</SelectedItemTemplate>
<ItemTemplate>
<div class="tab">
<div class="left"></div>
<asp:LinkButton OnCommand="ProcessTabSelection" CommandArgument='<%# Container.ItemIndex %>' ID="ExtendedLinkButton2" runat="server" TabIndex='<%# TabIndex + Container.ItemIndex %>'><span><%# DataBinder.Eval(Container.DataItem, "HeaderText") %></span></asp:LinkButton>
<div class="right"></div>
</div>
</ItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
I'm really running out of ideas right and I'm desperate for any ideas that you might have! Thank you.
You have option of ProxyScriptManager. You don't need name of update panel, u can iterate to control list till closest-upward update panel is found.

Categories

Resources