Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2004, 04:03 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
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?
  #2 (permalink)  
Old August 18th, 2004, 04:34 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
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!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:42 PM.


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