ajax uploader with page.aspx

Posted by Neer under ASP.NET AJAX on 2/28/2012 | Points: 10 | Views : 929 | Status : [Member] | Replies : 3
Hi all,

I am using anchor tag's list in master page for navigating from one child page to another child page

how to specify trgier for that and from where should i declare update panel and content template,

I m trying this way but it's giving me error .
-----------------------------------------------------------

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePAnel" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:PostBackTrigger ControlID="homepost" />
<asp:PostBackTrigger ControlID="PhotoPost" />
</Triggers>

<ContentTemplate>
<div id="bg" z-index="2">

<div id="main">
<div id="maintop"></div>
<!-- header begins -->
<div id="header">

<div id="buttons">
<ul>
<li><a id="homepost" href="Default.aspx">Home</a></li>
<li><a id="PhotoPost" href="Photogallery.aspx">Photo Gallery</a></li>
<li><a href="Gallery.aspx">Amenities</a></li>
<li><a href="Attraction.aspx">Area Information</a></li>
<li><a href="http://www.daysinn.com/DaysInn/control/Booking/modify_dates?brandCode=DI&searchWithinMiles=25&areaType=1&destination=Auburn&stateName=New%20York&state=NY&countryName=United%20States&country=US&checkInDate=&numberAdults=1&numberRooms=1&checkOutDate=&numberChildren=0&rateName=Best%20Avail&rate=000&id=07577&propBrandId=DI&" target="_blank">Reservation</a></li>
<li><a href="ContactUs.aspx">Contact</a></li>
</ul>
</div>



<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>



</ContentTemplate>

</asp:UpdatePanel>

-Neer


Responses

Posted by: Pradeepkumar417 on: 2/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Try like this

<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> 

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePAnel" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:PostBackTrigger ControlID="homepost" />
<asp:PostBackTrigger ControlID="PhotoPost" />
</Triggers>

<ContentTemplate>
<div id="bg" z-index="2">

<div id="main">
<div id="maintop"></div>
<!-- header begins -->
<div id="header">

<div id="buttons">
<ul>
<li><a id="homepost" href="Default.aspx">Home</a></li>
<li><a id="PhotoPost" href="Photogallery.aspx">Photo Gallery</a></li>
<li><a href="Gallery.aspx">Amenities</a></li>
<li><a href="Attraction.aspx">Area Information</a></li>
<li><a href="http://www.daysinn.com/DaysInn/control/Booking/modify_dates?brandCode=DI&searchWithinMiles=25&areaType=1&destination=Auburn&stateName=New%20York&state=NY&countryName=United%20States&country=US&checkInDate=&numberAdults=1&numberRooms=1&checkOutDate=&numberChildren=0&rateName=Best%20Avail&rate=000&id=07577&propBrandId=DI&" target="_blank">Reservation</a></li>
<li><a href="ContactUs.aspx">Contact</a></li>
</ul>
</div>
</ContentTemplate>

</asp:UpdatePanel>
</form>
</asp:ContentPlaceHolder>



Thanks & Regards,
Software Engineer,
Pradeep Kumar

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/28/2012 [Member] Starter | Points: 25

Up
0
Down
but this is my master page contents and this remains same.. just subpages will be changed.

i m not getting the logic y should i put the static code also in contentplace holder??

I mean this is of no use write..

I REplace The below code --------->

<li><a id="homepost" href="Default.aspx">Home</a></li>
<li><a id="PhotoPost" href="Photogallery.aspx">Photo Gallery</a></li>

---------------------------------------------
and place the below code
---------------------------------------------

<li><asp:LinkButton ID="HomePost" runat="server" PostBackUrl="~/Default.aspx">Home</asp:LinkButton></li>
<li><asp:LinkButton ID="PhotoPost" runat="server" PostBackUrl="~/Photogallery.aspx">Photo Gallery</asp:LinkButton></li>


with the thought that triggers postback triggers may fail with anchor tag.. but still its refreshing the maseter page along with the child pages

-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/28/2012 [Member] Starter | Points: 25

Up
0
Down
My only Contents place Holder's content gonna change on click of the anchor or link button else remains same

-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response