I am attempting to use the ajaxToolkit:CalendarExtender in my content.aspx page. The problem is that I have an asp:ScriptManager tag within my site.master page. How do I utilize the ScriptManagerProxy to replace the ajaxToolkit:ToolkitScriptManager in my content.aspx page.
* The code below is my site.Master *
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="cms.master.cs" Inherits="ccib.cms" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %>>
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:bundlereference runat="server" path="~/Content/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManagerProxy1" runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
<div class="container">
<div class="row">
<nav class="navbar navbar-default" role="navigation">
</nav>
</div>
</div>
<div class="container">
<div class="row">
<div class="container body-content">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div class="row">
<footer>
<p> © <%: DateTime.Now.Year %> </p>
</footer>
</div>
</div>
</form>
</body>
</html>
* The code below is my content.aspx *
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Content.aspx.cs" Inherits="ccib.mycms.Content" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
<asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender
ID="CalendarExtender2"
TargetControlID="txtStartDate"
Format="dd/MM/yyyy"
runat="server">
</ajaxToolkit:CalendarExtender>
</asp:Content>
I did find a work around for this although I am not sure it is ideal. For those also having this problem I did manage to get this to work by adding a second master page were I initiated the ToolScriptManager before the ScriptManagerProxy. The second Site.Master just uses the ScriptManagerProxy. The issue seems to be that I am unable to use a ScriptManagerProxy within my content pages to serve AJAX controls that utilize the ToolScriptManager. This will work until I find a better way. Below is my code for others to reference.
* Site-AJAX.Master *
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ></ajaxToolkit:ToolkitScriptManager>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManagerProxy>
Site.Master (For content pages that do require ToolScriptManager)
<asp:ScriptManager ID="ScriptManagerProxy1" runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
Also do not forget to add the toolkit to the web.config file.
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
</configuration>
Related
I'm keeping the referenced files in a bundle on a static server and want to reference to the AjaxControlToolKitScriptManager for scriptreference . It is not working . Is there any other way out?. Below is the code which I'm trying to implement. Browser is able to download file But telerik controls are not able to access it
public void IncludeBundleFiles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/JavaScript/TelerikListMaster").Include(
"~/JavaScript/Telerik/Core.js",
"~/JavaScript/Telerik/Ajax.js",
"~/JavaScript/Telerik/jQuery.js",
"~/JavaScript/Telerik/jQueryPlugins.js",
"~/JavaScript/Telerik/RadGridScripts.js",
"~/JavaScript/Telerik/GridCellSelection.js",
"~/JavaScript/Telerik/OverlayScript.js",
"~/JavaScript/Telerik/NavigationScripts.js",
"~/JavaScript/Telerik/AnimationScripts.js",
"~/JavaScript/Telerik/RadComboBoxScripts.js",
"~/JavaScript/Telerik/TouchScrollExtender.js",
"~/JavaScript/Telerik/RadMenuScripts.js",
"~/JavaScript/Telerik/RadContextMenuScripts.js",
"~/JavaScript/Telerik/RadFilterScripts.js",
"~/JavaScript/Telerik/RadMenuItem.js",
"~/JavaScript/Telerik/RadAutoCompleteBoxScripts.js",
"~/JavaScript/Telerik/PopUpScripts.js",
"~/JavaScript/Telerik/RadToolTipScripts.js",
"~/JavaScript/Telerik/RadToolTipManager.js",
"~/JavaScript/Telerik/RadInputScript.js",
"~/JavaScript/Telerik/RadNumericInputScript.js",
"~/JavaScript/Telerik/RadCalendarCommonScript.js",
"~/JavaScript/Telerik/RadCalendarScript.js",
"~/JavaScript/Telerik/RadDatePicker.js",
"~/JavaScript/Telerik/RadPickersPopupDirectionEnumeration.js",
"~/JavaScript/Telerik/RadInputManagerScript.js"));
}
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="true" ScriptMode="Release">
<CompositeScript Path="https://localhost/JavaScript/TelerikListMaster">
<Scripts>
</Scripts>
</CompositeScript>
</asp:ToolkitScriptManager>
We need to Place the references of scripts to get from Static server under composite tag and place the combine script of all the scripts on Static server. Please refer to this article for further information.here
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="true" ScriptMode="Release">
<CompositeScript Path="https://localhost/StaticServer/JavaScript/TelerikListMaster.js">
<Scripts>
<asp:ScriptReference Path="~/Scripts/Telerik/Common/Core.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/TextBox/RadInputScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/NumericTextBox/RadNumericInputScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/jQuery.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Navigation/OData.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/jQueryPlugins.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/TouchScrollExtender.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Navigation/OverlayScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Navigation/NavigationScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/ComboBox/RadComboBoxScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/ComboBox/View/ClassicView.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/RadGrid/RadGridScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadDatePicker.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadPickersPopupDirectionEnumeration.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/DateInput/RadDateInputScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/Scrolling/ScrollingScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Animation/AnimationScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/RadMenuScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/ContextMenu/RadContextMenuScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/MenuItem/RadMenuItem.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/View/ClassicView.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadCalendarScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadCalendarCommonScript.js" ScriptMode="Release" />
</Scripts>
</CompositeScript>
</asp:ToolkitScriptManager>
I've been trying to get the AjaxControlToolkit (downloaded from NuGet) version 7.0607 to work for web forms that use a masterpage with no luck.
Running DotNet 4.5
The MasterPage has the ToolkitScriptManager on it, but it does not pass down to child pages.
I can create a standalone aspx page, drop a scriptmanager on the page and the controls work just fine, so I figure there is a setting missing.
What is the procedure for making this work?
The masterpage script block is as so:
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="Common.Common.js" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="jquery.ui.combined" />
<asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
no bug, just bad advice from another forum.
The following lines were the culprit - either one messes up things:
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="Common.Common.js" />
Replacing the Microsoft script manager with toolkit script manger did the trick for me and they are working.
<asp:ScriptManager ID="ScriptManager1" runat="server">
with
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
I have a web page that has a masterpage. It has two drop downs. On Selected index chagne of dropdown1, I am calling the dropdown1_selectedindex changed. But nothing happens when I change the selection in the first drop down. I have placed the script manager in the master page. Update panel in the control page. The update panel encloses both the drop downs. Pelase help me. I am a starter and I thought this will be pretty straight forward. What am I missing here?
This is the .aspx
<%# Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.master" CodeBehind="Emailer.aspx.cs" Inherits="ServiceAlertEmailerGUI.Emailer" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<%-- <h2>
Welcome to ASP.NET!
</h2>--%>
<%-- <p>
To learn more about ASP.NET visit www.asp.net.
</p>--%>
<%-- <p>
You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
</p>--%>
<script type="text/javascript">
function HandleIT() {
alert("called");
}
</script>
<asp:Label ID="Label1" runat="server" Text="Status:"></asp:Label>
<asp:RadioButton ID="RadioButton1" Text="New Alert" GroupName="Status" runat="server" />
<asp:Label ID="Label2" runat="server" Text="Select Application: "></asp:Label>
<asp:UpdatePanel runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="ddApplicationList" runat="server"
OnSelectedIndexChanged="ddApplicationList_SelectedIndexChanged">
</asp:DropDownList>
<br />
<asp:RadioButton ID="RadioButton2" GroupName="Status" Text="Update" runat="server" />
<asp:Label ID="Label3" runat="server" Text="Select Service: "></asp:Label>
<asp:DropDownList ID="ddServcieList" runat="server" >
</asp:DropDownList>
</ContentTemplate>
<%--
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddApplicationList" EventName="ddApplicationList_SelectedIndexChanged" />
</Triggers>
--%>
</asp:UpdatePanel>
<br />
<asp:RadioButton ID="RadioButton3" GroupName="Status" Text="Resolved" runat="server" /><br />
<asp:RadioButton ID="RadioButton4" GroupName="Status" Text="Resolved (No Email)" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Build Template" Width="144px" />
<br />
<asp:RadioButton ID="RadioButton5" GroupName="Status" Text="Root Cause" runat="server" /><br />
<br />
</asp:Content>
Here is master page
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="ServiceAlertEmailerGUI.SiteMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<asp:ScriptManager ID="AjaxManager" EnablePageMethods ="true" EnablePartialRendering = "true" runat="server">
</asp:ScriptManager>
<div class="page">
<div class="header">
<div class="title">
<h1>
Service Alert Emailer
</h1>
</div>
<%-- <div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ Log In ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
</div>--%>
<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Emailer"/>
<%--<asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>--%>
</Items>
</asp:Menu>
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
</form>
</body>
</html>
Thanks guys for trying to help.
I figured out the mistake in the trigger. In the trigger, eventname should be the event name SelectedIndexChanged rather that ddApplicationList_SelectedIndexChanged.
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddApplicationList" EventName = "SelectedIndexChanged"/>
</Triggers>
sorry I lost the other link that gave me this answer.
I have a webbrowser in my winphone 7 app to display a few webpages that contains 2 buttons left and right with a title in the middle, below that a gridview and a few pictures below the gridview.
I tried just about every combination of the following:
<!--meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=0.35; user-scalable=yes" /-->
<!--meta name="mobileoptimized" content="0" /-->
<!--meta name="viewport" content="width=480; initial-scale=5.0; user-scalable=yes;" id="ViewPort" runat="server" />
<!--meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" /-->
<!--meta name="HandheldFriendly" content="true" /-->
<!--meta name="apple-mobile-web-app-capable" content="yes" /-->
If I use device-width the last few columns in my gridview is off screen, trying to scale it properly with initial-scale does nothing.
If I use a set width, for instance 320 or 640, the gridview becomes to small (smaller then the width of the screen), and initial-scale again does nothing.
Any idea's ?
aspx source added :
<%# Page Language="C#" AutoEventWireup="true" CodeFile="iDetailled.aspx.cs" Inherits="iDetailled" Title="test" EnableEventValidation="false" %>
<%# Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<!--meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=0.35; user-scalable=yes" /-->
<!--meta name="mobileoptimized" content="0" /-->
<meta name="viewport" content="width=device-width, initial-scale=0.9,user-scalable=yes" id="ViewPort" runat="server" />
<!--meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" /-->
<!--meta name="HandheldFriendly" content="true" /-->
<!--meta name="apple-mobile-web-app-capable" content="yes" /-->
<title></title>
<script type="text/javascript">
function CallMe() { javascript: history.go(-1); }
</script>
</head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"
media="screen"/>
<body class="GradientBackground3" bgcolor="#CFD1D2">
<form id="form1" runat="server" >
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="True"
onnavigate="ScriptManager1_Navigate">
</asp:ScriptManager>
<div align="center">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:MultiView ID="MultiView1" runat="server"
onactiveviewchanged="MultiView1_ActiveViewChanged" >
<asp:View ID="View1" runat="server">
<br />
<asp:Panel ID="Panel2" runat="server" Width="90%" >
<table align="center" width="100%">
<tr>
<td align="left" >
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/Images/min2.png" Height="48px" onclick="ImageButton1_Click"
Width="48px" />
</td>
<td>
<table align="center" >
<tr align="center">
<td>
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large" Text="Turnover by day"></asp:Label>
</td>
</tr>
<tr align="center">
<td>
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</table>
</td>
<td align="right">
<asp:ImageButton ID="ImageButton2" runat="server" Height="48px"
ImageUrl="~/Images/plus2.png" onclick="ImageButton2_Click" Width="48px" />
</td>
</tr>
</table>
</asp:Panel>
<br />
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataSourceID="SqlDataSourceDag" ForeColor="#333333"
GridLines="Vertical" onrowcreated="GridView2_RowCreated"
onselectedindexchanged="GridView2_SelectedIndexChanged"
onrowdatabound="GridView2_RowDataBound"
EmptyDataText="No data to display" >
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="TYBusinessDate" DataFormatString="{0:dd/MM}"
HeaderText="This Year" ReadOnly="True"
SortExpression="TYBusinessDate">
<HeaderStyle VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
</asp:BoundField>
<asp:BoundField DataField="LYBusinessDate" DataFormatString="{0:dd/MM}"
HeaderText="Last Year" ReadOnly="True"
SortExpression="LYBusinessDate">
<HeaderStyle VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
</asp:BoundField>
<asp:BoundField DataField="Day" HeaderText="Day" ReadOnly="True"
SortExpression="Day">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="TYTurnoverAmt" DataFormatString="{0:F0}"
HeaderText="This Year" ReadOnly="True" SortExpression="TYTurnoverAmt">
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="LYTurnoverAmt" DataFormatString="{0:F0}"
HeaderText="Last Year" ReadOnly="True" SortExpression="LYTurnoverAmt">
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField HeaderText="%">
<ItemTemplate>
<asp:Label ID="Label55" runat="server" Text="Label"></asp:Label>
</ItemTemplate>
<HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Right" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:BoundField DataField="TYClients" HeaderText="This Year" ReadOnly="True"
SortExpression="TYClients" >
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="LYClients" HeaderText="Last Year" ReadOnly="True"
SortExpression="LYClients" >
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/Images/arrow.png"
onclick="ImageButton5_Click" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
<br />
<asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSourceDag" BackColor="#CFD1D2" >
<Titles>
<asp:Title Name="Title1" Text="Turnover">
</asp:Title>
</Titles>
<series>
<asp:Series Name="ThisYear" XValueMember="Day" YValueMembers="TYTurnoverAmt" LegendText="Turnover this year">
</asp:Series>
<asp:Series Name="LastYear" XValueMember="Day" YValueMembers="LYTurnoverAmt" LegendText="Turnover last year">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true" Area3DStyle-IsClustered="true" BackColor="White" >
<AxisY IntervalAutoMode="VariableCount" IntervalType="Number" IntervalOffsetType="Number">
</AxisY>
<Area3DStyle Enable3D="True" IsClustered="True" />
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend Docking="Bottom" Name="Legend1" BackColor="#CFD1D2" >
</asp:Legend>
</Legends>
</asp:Chart>
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSourceDag" BackColor="#CFD1D2">
<Titles>
<asp:Title Name="Title1" Text="Clients">
</asp:Title>
</Titles>
<series>
<asp:Series ChartType="Line" Legend="Legend1"
Name="ClientTY" XValueMember="Day" YValueMembers="TYClients" BorderWidth="3" LegendText="Clients this year">
</asp:Series>
<asp:Series ChartType="Line" Legend="Legend1"
Name="ClientLY" XValueMember="Day" YValueMembers="LYClients" BorderWidth="3" LegendText="Clients last year">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" >
<AxisY IntervalAutoMode="VariableCount" IntervalType="Number" IntervalOffsetType="Number">
</AxisY>
<AxisX IsLabelAutoFit="False">
<LabelStyle Angle="-90" />
</AxisX>
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend Docking="Bottom" Name="Legend1" BackColor="#CFD1D2">
</asp:Legend>
</Legends>
</asp:Chart>
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Back"
Visible="False" />
<br />
<asp:SqlDataSource ID="SqlDataSourceDag" runat="server"
ConnectionString="<%$ ConnectionStrings:OSCConnectionString %>"
SelectCommand="WWWiPhoneAllStoresPerDay" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</asp:View>
....second view stripped
</asp:MultiView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
The attributes initial-scale, minimum-scale, and maximum-scale are unsupported in WP7. For now, you can only use height, width, and user-scalable. I've found that the blog post Matt linked to has some incorrect/misleading info. See the following for more accurate information: http://msdn.microsoft.com/en-us/library/ff462082%28VS.92%29.aspx
Also, from what I've seen, WP7 needs the separators between attributes to be commas, not semi-colons.
Without being able to see the page you're trying to display it's hard to say for sure but it sounds like you may have something else on the page affecting the display of the grid.
For reference, the viewport options are documented at http://blogs.msdn.com/b/iemobile/archive/2010/11/22/the-ie-mobile-viewport-on-windows-phone-7.aspx
I found the most suitable viewport for mobile windows 7 is:
<meta id="viewport" name="viewport" content="width=${wurfl.getProperty('max_image_width')}; initial-scale=1.0; maximum-scale=1.0"/>
Hello everyone i need help. Ive been having this problem for almost a day now. dropdown list won't populate from database
Below is the code i am using:
<%# Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PhotoAlbum.aspx.vb" Inherits="PhotoAlbum" %>
Members Of Ephesians 5:10 Photo Album!
<asp:SqlDataSource ID="categoriesDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [CategoryID], [Name] FROM [Categories] WHERE ([UserId] = #UserId) ORDER BY [Name]">
<SelectParameters>
<asp:QueryStringParameter Name="UserId" QueryStringField="ID"/>
</SelectParameters>
</asp:SqlDataSource>
<br />
<br />
<h1 style="font-weight:bold">Filter Pictures By Category:
<asp:DropDownList ID="categories" runat="server"
AppendDataBoundItems="True"
DataSourceID="categoriesDataSource" AutoPostBack="True"
DataTextField="Name" DataValueField="CategoryID">
</asp:Content>
i need help pls
set AutoEventWireup="true" in page directive
I quickly created a test page with following code, it works for me:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="testddl.aspx.cs" Inherits="testddl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1" DataTextField="CategoryName"
DataValueField="CategoryID">
</asp:DropDownList>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:TESTDBConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Categories] WHERE ([UserID] = #UserID)">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="1" Name="UserID" QueryStringField="ID"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
dbo.Categories:
Screenshot: