Hello I'm new to VB and ASP and have a problem that I cant find a solution for.
I am using MSChart in an ASP Site in VB Language and I'm currently trying to change the charttype.
I could change it in my code but I want to do it on the website maybe in an dropdownmenu.
At first it would be okay if i Could change it with a simple button.
Sorry for the code it's a big mess because I tried so many things to make it work.
Thanks for your help!
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ 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"><add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/><title>MSChart Test</title><meta http-equiv="refresh" content=2 /><link href="design.css" type="text/css" rel="stylesheet"></head><body Bgcolor="black" onload="f1()"><form id="form1" runat="server"><center><font color="white"><h1>MSChart Test</h1></font><table border="2"><tr><asp:panel ID="Panel1" runat="server"><td width="100%"><asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" Height="24px" Width="142px"><asp:ListItem>Bar Chart</asp:ListItem><asp:ListItem Value='Charttype="pie"' Text='ChartType="pie"'>Pie Chart</asp:ListItem></asp:DropDownList><br /><asp:DropDownList ID="DropDownList3" runat="server" Height="100%" AutoPostBack="True"><asp:ListItem>Column</asp:ListItem><asp:ListItem Value=' Change ChartType="pie"' Text='Charttype="pie"'>Pie</asp:ListItem></asp:DropDownList><asp:Chart ID="chart1" runat="server" Width="800px"><Series><asp:Series Name="Temperatur2012" XValueType="Int32" ChartType="column" ChartArea="MainChartArea" Label="c°" MarkerBorderColor="Blue" Legend="Legend" IsXValueIndexed="True"><Points><asp:DataPoint AxisLabel="Januar" YValues="4,4" /><asp:DataPoint AxisLabel="März" YValues="8,9" /><asp:DataPoint AxisLabel="Mai" YValues="15,2" /><asp:DataPoint AxisLabel="Juli" YValues="18,1" /><asp:DataPoint AxisLabel="September" YValues="0,4" /><asp:DataPoint AxisLabel="November" YValues="7,1" /></Points></asp:Series></Series><ChartAreas><asp:ChartArea Name="MainChartArea"></asp:ChartArea></ChartAreas></asp:Chart></td></asp:panel><td><asp:DropDownList ID="DropDownList1" runat="server" Height="100%" AutoPostBack="True"><asp:ListItem>Column</asp:ListItem><asp:ListItem Value='ChartType="pie"' Text='Charttype="pie"'>Pie</asp:ListItem></asp:DropDownList></td></tr><tr><td height="100%"><asp:Calendar ID="Calendar1" runat="server" Width="220px" Height="200px" WeekendDayStyle-VerticalAlign="NotSet" WeekendDayStyle-HorizontalAlign="NotSet" BackColor="White" BorderColor="#3366CC" SelectedDayStyle-BackColor="Green" SelectorStyle-BackColor="Blue" SkinID="678" TodayDayStyle-BackColor="Yellow" CellPadding="1" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#003399"><SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99"></SelectedDayStyle><SelectorStyle BackColor="#99CCCC" ForeColor="#336666"></SelectorStyle><WeekendDayStyle BackColor="#CCCCFF" /><TodayDayStyle BackColor="#99CCCC" ForeColor="White"></TodayDayStyle><OtherMonthDayStyle ForeColor="#999999" /><NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" /><DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" /><TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" /></asp:Calendar></td></tr></table></body></html>