Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2004, 04:03 AM
Authorized User
 
Join Date: Jun 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default custom control quick starts problem

Hi everybody
Im going through the quickstarts for asp.net. On the custom control section ive compiled the simple.vb and created a virtual directory and created a folder: /bin at the root of this VD and i have placed the .dll in this folder. I have placed the following .aspx file in the VD

<%@ Register TagPrefix="SimpleControlSamples" Namespace="SimpleControlSamples" Assembly="Simple" %>
<html>
   <body>
      <form method="POST" action="Simple.aspx" runat=server>
          <SimpleControlSamples:SimpleVB id="MyControl" runat=server/>
      </form>
   </body>
</html>

however when i load the page in the browser i get the following error:

 Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.]
   System.Text.StringBuilder.AppendFormat(IFormatProv ider provider, String format, Object[] args) +1232
   System.String.Format(IFormatProvider provider, String format, Object[] args) +65
   System.IO.TextWriter.Write(String format, Object arg0, Object arg1, Object arg2) +84
   SimpleControlSamples.simpleVB.Render(HtmlTextWrite r Output) +33
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
   System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +72
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter writer) +44
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter output) +262
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
   System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +72
   System.Web.UI.Control.Render(HtmlTextWriter writer) +7
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
   System.Web.UI.Page.ProcessRequestMain() +1929

any sugestions?
 
Old August 18th, 2004, 04:34 AM
Authorized User
 
Join Date: Jun 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i solved it, my vb file had an error in it from where i was typing it in

the line
 output.write("{1}, {2}, {3}" ......

was supposed to be
 output.write("{0}, {1}, {2}" ......

doh! i was up for ages last night trying to fix that! mental note to self GET MORE SLEEP!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Server Control....Custom Property Editor ZArrinPour ASP.NET 1.0 and 1.1 Basics 1 June 15th, 2010 11:30 AM
Web Service, Custom Control, Custom Return Type robzyc ASP.NET 2.0 Basics 6 June 10th, 2008 08:03 AM
custom control inside custom control issues StevesonD ASP.NET 2.0 Professional 1 February 19th, 2008 06:54 PM
Quick Time control on every page at P2P Imar Forum and Wrox.com Feedback 3 August 15th, 2006 09:20 AM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.