Showing posts with label default. Show all posts
Showing posts with label default. Show all posts

Monday, March 26, 2012

CallBack on ContentPageHolder

Hi everyone,

I have a Master Page called AppMaster.master And I have two aspx pages: Default.aspx and News.aspx.

On my AppMaster.master i have one Menu (top of the page) and Ads (left and right of the page). I have a ContentPlaceHolder in AppMaster. When i click on Home the page refresh and go to /Default.aspx, the same thing for /News.aspx.

I want to refresh only the content of the masterpage using callback or AJAX. I probed two methods but i can't refresh only the content. When i click news on the menu of the master page refresh only the content showing /News.aspx without postback. I used the updatepanel but it does'n work.

Can you help me please? Thanks...Confused

This is your scenario?

1) You have a master page,

2) You have two content pages that use the master page,

3) You want to refresh the UpdatePanel on the content page when someone clicks a link on the Master Page?

Check this out, and if this does not help you then let me know:http://www.ben-rush.net/blog/PermaLink.aspx?guid=d29bafbb-35f5-425e-9105-c1ddaae3b003&dotnet.

...it's possible I don't understand exactly what you're trying to do.


Option 3. I have a Menu with the MenuItemClick method.

Thank you very much...


Option 3. I have a Menu with the MenuItemClick method. It doesn't work because new MenuEventArgs doesn't work :(

Thank you very much...

Wednesday, March 21, 2012

CalendarExtender, want only current month date visible

hi all,

I have a problem, I want to display days of only current month or whichever month a user selects. I mean by default calendar extender shows all dates , even if we have selected November, it will show some days of previous month and some days of next month along with current month's dates. I only want to display current month's dates.

I applied css specified in http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx

but that's changing color of each day. I was thinking by using css somehow i will hide previous and next month days, but of not avail.

please suggest,

thanks...

Hi Forums_user,

As far as I know, it is not supported now unless you modify its source code. CalendarExtender generate all the days , months and years on the client, you can find it in its source code with the name _buildDays,_buildMonths and _buildYears.

I hope this help

Best regards,

Jonathan

CalendarExtender question

I have a textbox, an image button and a calendar extender on my form. If I go with the default and don't make an entry for the PopupControlID attribute, the calendar gets displayed when the textbox gets focus and I can select a date from it. If I use the image button as the entry for the PopupControlID attribute, the calendar initially gets displayed but then the whole page posts to the server and returns before a date can be selected. There aren't any AJAX controls on the MasterPage and nothing in it's code-behind that would cause this issue. There also isn't currently any code-behind in my form ... just HTML ... and I'm posting it in its entirety below:

<%@dotnet.itags.org.PageLanguage="VB"MasterPageFile="~/MasterPages/MasterPage.master"AutoEventWireup="false"CodeFile="CalendarTest.aspx.vb"Inherits="Correspondence_CalendarTest"title="Untitled Page" %>
<%@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<asp:ScriptManagerrunat="server"></asp:ScriptManager>
<br/><br/>
<asp:TextBoxID="Date1"runat="server"></asp:TextBox>
<asp:ImageButtonID="ImageButton1"runat="server"ImageUrl="~/Images/Calendar_scheduleHS.png"/>
<cc1:CalendarExtenderID="CalendarExtender1"runat="server"TargetControlID="Date1"PopupButtonID="ImageButton1">
<%--
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="Date1">
--%>
</cc1:CalendarExtender>

</asp:Content>

Why does this bloody thing insist on posting back to the server and is there anything I can do to prevent it from occurring?

TIA,

Allen

this is from another issue close to what you have because when you click the button a second time it does a post back as well. there is the solution from another post.

just to say, I've found this can be solved by creating a plain html img tag and assigning the popubbutton id to that instead of an asp imagebutton control


Did you make sure the CAUSESVALIDATION property of the Calendarextender is set to false? There is no problem using an asp:imagebutton control if you have that done. I mean that way when the Calendar control is clicked, all that happens is the control opens and selection is made.

Dollarjunkie