Calendar extender not popping up - ajaxcontroltoolkit

I have no idea why my ajax calender extender not popping up with I click on my textbox
<%# Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
Please select Start date<asp:TextBox ID="TextBoxstart" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="TextBoxstart_CalendarExtender" runat="server"
Format="dd/MM/yyyy" TargetControlID="TextBoxstart">
</cc1:CalendarExtender>
Please Select End Date <asp:TextBox ID="TextBoxend" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="TextBoxend_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBoxend">
</cc1:CalendarExtender>
When I click in the textbox nothing happens. I have also included the ajaxcontroltoolkit.dll in the bin folder and nothing. I have other projects with this control and no problem at all. I have also used and still nothing

from your current code, TextBoxstart is not in the code snippet. Only "TextBoxend".
The end date should work as you have the calendarextender's TargetControlID set to it. Just not for TextBoxstart.

Related

SyncFusion : syncfusion dialog does not open correctly in Internet Explorer

I am using SyncFusion dialog box as below in one of my project.
<%=Html.Syncfusion().Dialog("divUpdateStatus")
.Title("Update Status")
.AutoOpen(false).Modal(true).Width(550).Height(370)
.AutoFormat(Skins.Office2007Black)
.Resizable(false)
%>
It does work fine in all the browsers except Internet Exploere(any version).
When I click on the button to open this dialog, it does open but everything is inactive.
All the buttons and textboxes on the dialog are disabled.
Not even Cross button to cancel the dialog is enabled to close the dialog.
I have to press 'ESC' to comeout of this, then again I click on button to open that, it works fine.
On the added reference of the Syncfusion dll, it shows Version: 10.204.0.56
Anyone has idea on this?
Thank you,
I have used Syncfusion Dialog in my application, but it is working fine in Internet Explorer for me. My application referred jquery-1.4.2 script and jquery-ui-1.8.22 script within it. Dialog is working fine with this.
I have used Syncfusion version 10.2.0.56 and use the below code to render Dialog,
<code>
<div id="divUpdateStatus" style="visibility: hidden;">
<%=Html.Label("lbl", "UserName") %>
<%=Html.TextBox("text")%><br /><br />
<%=Html.Label("lbl2", "Password")%>
<%=Html.TextBox("text")%><br /><br />
<%=Html.Syncfusion().Button("btn").Text("Submit")%>
</div>
<%=Html.Syncfusion().Dialog("divUpdateStatus").Title("UpdateStatus").AutoOpen(false).Modal(true).Width(550).Height(370).AutoFormat(Skins.Office2007Black).Resizable(false) %>
<%=Html.Syncfusion().Button("button").ClientSideOnClick("onclick").Text("Click to open the dialog")%>
<script type="text/javascript">
function onclick(sender, args) {
$("#divUpdateStatus").dialog("open");
}
</script>
</code>
Share more details or issue reproducible steps in detail and we will see what’s wrong with your code.
Regards,

Ajax ComboBox rendering incorrectly

I'm using the ComboBox from the AjaxControlToolkit v4.1.50731. When it displays on the page, the dropdown list renders well below the origin of the control. Unfortunately, I can't post an image due to SO restrictions.
I kept the code to a minimum on the page to avoid any possible conflicts:
<AjaxToolKit:ComboBox ID="ComboBox1" runat="server">
<asp:ListItem Text="Mild" Value="0" />
<asp:ListItem Text="Medium" Value="1" />
<asp:ListItem Text="Hot" Value="2" />
</AjaxToolKit:ComboBox>
Any idea why this is happening or how it can be corrected?
The issue was caused by CSS styling but I couldn't isolate it the exact cause. To resolve the problem, I created a new page with no styling and only the combo box control, calling it "PlainComboBox.aspx". Then I used an iframe tag in the page where I wanted to display the combo box, as seen below:
<iframe src="PlainComboBox.aspx" frameborder="0" height="130" >
<p>Your browser does not support iframes.</p>
</iframe>
This isolated the combo box from any styling issues elsewhere on the page and rendered correctly.

asp:Menu in master page pushes the content below on hover

I’m working on asp.net web site in .net 4.0 framework (VS 2010) in Win XP SP2.
In site.master page I have a control and it is populated dynamically. All is well in populating the control, but when mouse is hover on this menu item, it displays correct, but it pushes the content of page below (in my example, the content of “MainContent” is pushed below).
I tried changing the property of div, but no joy.. any help will be much appreciated.
Content of Site.Master
**<div class="title">
<h1>
My ASP.NET Application
</h1>
</div>
<div class="clear hideSkiplink">
<asp:Menu ID="mnuMain" runat="server" BackColor="#FFFFCC" CssClass="menu">
<DynamicItemTemplate>
<%# Eval("Text") %>
</DynamicItemTemplate>
</asp:Menu>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="footer">
</div>**
Sample code to add it dynamically
**MenuItem item = new MenuItem();
MenuItem item1 = new MenuItem();
item.Text = "Main Menu";
item1.Text = "sub menu1";
item.ChildItems.Add(item1);
mnuMain.Items.Add(item);**
You have got a clear on the div that wraps the menu. Instead of clear the wrapper should be floated.
Is there any CSS relate to the mark up above?

How do you modify Sitefinity's breadcrumb control?

I need to modify sitefinity's breadcrumbs from this:
Home
to this:
Home >
So if the breadcrumb is on the root page, it needs to have the > after it.
Im an absolute beginner, so go easy on me! (using version 3.7)
Regards
Peter
I had a similar problem in the past and solved it by creating a custom user control with the breadcrumb control embedded within it. this allows you to add your own custom logic in the code behind to show or hide things as necessary:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>
<%# Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI" %>
<asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »
<sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />
here you can hide the BreadCrumb on the home page, showing the homepage hyperlink, which you can customize to show whatever you need.
There may be a better way to do this, but this was the fastest, easiest way I could figure out to do it.
hope this was helpful!
You can easily change the mockup separator. You need to edit the Breadcrumb, click on the advanced button and find the NodeSeparatorMarkup field.
In my case I've put >> instead of >
<span class='sfBreadcrumbNodeSeparator'>»</span>;

ModalPopupExtender shows popup when the user hits the back button

How do I stop a ModalPopupExtender from showing the popup when a user navigates to the page via the browser's back button?
I tried to implement the solution found here which essentially handles the ModalPopup using client side script but had trouble with its implementation. ($find("modPop") always returns null).
Are there other techniques for handling this?
EDIT: The plot thickens. This only occurs because I am using an UpdatePanel inside of the popup. The code below should duplicate the error. Also note, the use of the dummy button is required.
Click button to show modalConfirm modal
Navigate away from page
Navigate back to page w/ back button
Modal appears undesireably.
<%# Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"> </asp:ScriptManager>
<span style="display:none;"><asp:Button ID="btnDummy" runat="server" Text="Dummy" /></span>
<asp:Button id="btnShow" runat="server" Text="Show Modal"/>
<ajax:ModalPopupExtender ID="mpTest" runat="server" TargetControlID="btnDummy" PopupControlID="pnlTest"></ajax:ModalPopupExtender>
<asp:Panel id="pnlTest" style="display:none;border:10px solid green" DefaultButton="btnTest" runat="server">
<asp:UpdatePanel ID="upTest" runat="server">
<ContentTemplate>
<asp:Button ID="btnTest" runat="server" Text="Test" />
</ContentTemplate>
<Triggers>
<ajax:AsyncPostBackTrigger ControlID="btnTest" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
StackOverflow
</div>
</form>
Partial Class Test
Inherits System.Web.UI.Page
Protected Sub btnShow_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShow.Click
mpTest.Show()
End Sub
Protected Sub btnTest_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTest.Click
mpTest.Hide()
End Sub
End Class
I think this makes sense as when you confirm the modal a full postback doesn't happen but I need to do it this way. Are there any workarounds?
In the solution on the ASP.NET forum, the modPop in $find("modPop") is the behavior id of the modal popup which in your case will be mpTest. Try explicitly setting BehaviorId="mpTest" on your ModalPopupExtender as well and see if it works.