Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > passing variables

Reply
Thread Tools

passing variables

 
 
David
Guest
Posts: n/a
 
      07-25-2005
Hi,

I have this (thanks Clint) which I have modified slightly from Clints code.

using System;

namespace NewsGroupHelpASPNET
{
/// <summary>
/// Summary description for MyPage.
/// </summary>
public class PageClass
{
private Table tables;
private StringBuilder sb = null;

public PageClass()
{
}

public void WriteText(string textToWrite)
{
sb.Append(textToWrite)
}

public Table Tables
{
get { return this.tables; }
set { this.tables = value; }
}
}
public class Table
{
private Row[] rows;
public Table()
{

}
public Row[] Rows
{
get { return this.rows; }
set { this.rows = value; }
}
public Add(int Rows, int Cols)
{
}
public Close()
{
}
}
public class Row
{
private Cell[] cells;
public Row()
{

}
public Cell[] Cells
{
get { return this.cells; }
set { this.cells = value; }
}
}
public class Cell
{
private string cellText;
public Cell()
{

}
public string Text
{
get { return this.cellText; }
set { this.cellText = value; }
}
}
}


When I do table.Add(2, 2), I need to add some text into the StringBuilder sb
which is in the top level class PageClass. I will also need to do this
within the Row and Cell as well as Text.

On top of this, the 2, 2 in the Add, I will need to store somewhere so that
Row and Cell can access them.

Thanks for any help you can offer.

Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      07-26-2005
Anybody???

Best regards,
Dave Colliver.
http://www.CoventryFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"David" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I have this (thanks Clint) which I have modified slightly from Clints
> code.
>
> using System;
>
> namespace NewsGroupHelpASPNET
> {
> /// <summary>
> /// Summary description for MyPage.
> /// </summary>
> public class PageClass
> {
> private Table tables;
> private StringBuilder sb = null;
>
> public PageClass()
> {
> }
>
> public void WriteText(string textToWrite)
> {
> sb.Append(textToWrite)
> }
>
> public Table Tables
> {
> get { return this.tables; }
> set { this.tables = value; }
> }
> }
> public class Table
> {
> private Row[] rows;
> public Table()
> {
>
> }
> public Row[] Rows
> {
> get { return this.rows; }
> set { this.rows = value; }
> }
> public Add(int Rows, int Cols)
> {
> }
> public Close()
> {
> }
> }
> public class Row
> {
> private Cell[] cells;
> public Row()
> {
>
> }
> public Cell[] Cells
> {
> get { return this.cells; }
> set { this.cells = value; }
> }
> }
> public class Cell
> {
> private string cellText;
> public Cell()
> {
>
> }
> public string Text
> {
> get { return this.cellText; }
> set { this.cellText = value; }
> }
> }
> }
>
>
> When I do table.Add(2, 2), I need to add some text into the StringBuilder
> sb which is in the top level class PageClass. I will also need to do this
> within the Row and Cell as well as Text.
>
> On top of this, the 2, 2 in the Add, I will need to store somewhere so
> that Row and Cell can access them.
>
> Thanks for any help you can offer.
>
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is difference between Class variables and Instance variables? rahul8143@gmail.com Java 10 06-06-2011 06:43 AM
Put variables into member variables or function variables? tjumail@gmail.com C++ 9 03-23-2008 04:03 PM
Session Variables and Static Variables cobus.lombard@gmail.com ASP .Net 1 03-26-2006 11:05 AM
Accessing class member variables - properties or variables? dwok Java 7 03-04-2005 03:54 AM
Re: Class public shared Variables vs. Application Variables in ASP.NET avnrao ASP .Net 0 05-07-2004 05:28 AM



Advertisments