Profile Picture

nocodebehind help

Posted By Michael Sides 14 Years Ago
Author
Message
Michael Sides
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 1, Visits: 1

I'm trying to create a simple ASPX file with no code behind as part of a Windows gadget application I'm writing used to display a gauge within a gadget.   The code below is very similar to the nevron nocodebehind example but does not work.  It fails with the following message:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>.

 

Any help would be greatly appreciated.   Thanks.

 

file:  index.aspx

<%@ Page language="vb" debug="true"%>
<%@ Register TagPrefix="ncwc" Namespace="Nevron.Chart.WebForm" Assembly="Nevron.Chart.WebForm" %>
<%@ Import namespace ="System.Drawing"%>
<%@ Import namespace ="Nevron.UI.WebForm.Controls"%>
<%@ Import namespace ="Nevron.Chart.WebForm"%>
<%@ Import namespace ="Nevron.Chart"%>
<%@ Import namespace ="Nevron"%>
<%@ Import namespace ="Nevron.GraphicsCore"%>
<html>
<body>
<table>
<td>
<%
    'create chart control
    Dim nChartControl1 As NChartControl = New NChartControl
    nChartControl1.Page = Me
    nChartControl1.Width = 300
    nChartControl1.Height = 300
       
    'clear panels
    nChartControl1.Panels.Clear()
   
    'set background gradient
    nChartControl1.BackgroundStyle.FillStyle = New NGradientFillStyle(Color.White, Color.Black)
   
    'create gauge
    Dim RadialGauge As New NRadialGaugePanel
    nChartControl1.Panels.Add(RadialGauge)

    'create needle
    Dim NeedleIndicator As New NNeedleValueIndicator
    RadialGauge.Indicators.Add(NeedleIndicator)
    NeedleIndicator.Value = 25
  
    Dim writer As HtmlTextWriter = New HtmlTextWriter(Page.Response.Output)
    nChartControl1.RenderControl(writer)
    Page.Controls.Add(nChartControl1)
%>
</td>
</table>
</body>
</html>




Threaded View

Threaded View
Forum Post nocodebehind help By Michael Sides ( 14 Years Ago )
Forum Post Hi Michael, You should remove the... By Nevron Support ( 14 Years Ago )


Similar Topics


Reading This Topic