Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Monday, March 26, 2012

Newbie: Please help!

Hi :)

I've just started using ASP so I know this will be very easy for most
of you to answer;

I an asp file/page. Here is the code:

<%@dotnet.itags.org.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body
The time is <%= Time %
</body>
</html
I tested it on my PC using a virtual server and it worked fine - told me the
time :)
However, I uploaded the file to some webspace I own, loaded it from my
browser
and all I get is the following output:

The time is

Please please please somebody please tell me what I'm doing wrong? How do
I get a simple ASP page using VBscript to work?

JamesYou may need to repair your IIS mappings.
To do this, run the following command:
aspnet_regiis.exe -i

Here's further information:
http://support.microsoft.com/defaul...B;EN-US;q306005

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
Hi J:

This may be a silly question, but is the webspace you are talking
about .NET Framework enabled? Does it support ASP.NET?

Kevin Parkinson
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James

Newbie: Please help!

Hi :)
I've just started using ASP so I know this will be very easy for most
of you to answer;
I an asp file/page. Here is the code:
<%@dotnet.itags.org.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
The time is <%= Time %>
</body>
</html>
I tested it on my PC using a virtual server and it worked fine - told me the
time :)
However, I uploaded the file to some webspace I own, loaded it from my
browser
and all I get is the following output:
The time is
Please please please somebody please tell me what I'm doing wrong? How do
I get a simple ASP page using VBscript to work?
JamesYou may need to repair your IIS mappings.
To do this, run the following command:
aspnet_regiis.exe -i
Here's further information:
http://support.microsoft.com/defaul...B;EN-US;q306005
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
>
Hi J:
This may be a silly question, but is the webspace you are talking
about .NET Framework enabled? Does it support ASP.NET?
Kevin Parkinson
"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James
>

Newbie: Please help!

Hi :)

I've just started using ASP so I know this will be very easy for most
of you to answer;

I an asp file/page. Here is the code:

<%@dotnet.itags.org.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body
The time is <%= Time %
</body>
</html
I tested it on my PC using a virtual server and it worked fine - told me the
time :)
However, I uploaded the file to some webspace I own, loaded it from my
browser
and all I get is the following output:

The time is

Please please please somebody please tell me what I'm doing wrong? How do
I get a simple ASP page using VBscript to work?

JamesYou may need to repair your IIS mappings.
To do this, run the following command:
aspnet_regiis.exe -i

Here's further information:
http://support.microsoft.com/defaul...B;EN-US;q306005

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"J" <nospam@.thankyou.com> wrote in message
news:z0ihc.357$vf.5@.newsfe2-gui.server.ntli.net...
> Hi :)
>
> I've just started using ASP so I know this will be very easy for most
> of you to answer;
> I an asp file/page. Here is the code:
>
> <%@.LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> The time is <%= Time %>
> </body>
> </html>
>
> I tested it on my PC using a virtual server and it worked fine - told me
the
> time :)
> However, I uploaded the file to some webspace I own, loaded it from my
> browser
> and all I get is the following output:
>
> The time is
>
> Please please please somebody please tell me what I'm doing wrong? How do
> I get a simple ASP page using VBscript to work?
>
> James

Newbie: problem posting

Hi All,

I've got the following .aspx file with the then following .cs code. The
page renders fine on first run, but once I click the submit, it just comes
back with a cannot be displayed page indicating that the page is not
available. Anyone see what probably obvious or stupid thing I'm missing?

TIA,

John

Test.aspx:
========

<%@dotnet.itags.org. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:datagrid id="grdAccount" runat="server" Height="100%"
Width="100%"></asp:datagrid>
<input type="submit" value="Submit Query" runat="server" />
</form>
</body>
</html
Temp.cs code:
==========
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.OleDb;

public class dgrdAccountSort : Page
{
private string SortExpression;
protected DataGrid grdAccount;

protected void Page_Load(object Src, EventArgs e)
{
BindGridReader();
}

public void BindGridReader()
{
string SelectCommand = "SELECT * FROM AcctName";
if (SortExpression != null)
SelectCommand += " ORDER BY " + SortExpression;

OleDbConnection conn = new OleDbConnection(@dotnet.itags.org."Provider=vfpoledb.1;User
Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
);
OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );

conn.Open();
IDataReader reader = cmd.ExecuteReader();
grdAccount.DataSource = reader;
grdAccount.DataBind();

conn.Dispose();
}
}John,

Instead of Connection.Dispose();

Use Connection.Close(); and then Connection.Dispose() instead.

Connection.Dispose() tells the .Net garbage collector that it's okay to
dispose of an object when it gets around to it. It does not close the
connection.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche

"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> Hi All,
> I've got the following .aspx file with the then following .cs code. The
> page renders fine on first run, but once I click the submit, it just comes
> back with a cannot be displayed page indicating that the page is not
> available. Anyone see what probably obvious or stupid thing I'm missing?
> TIA,
> John
> Test.aspx:
> ========
> <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:datagrid id="grdAccount" runat="server" Height="100%"
> Width="100%"></asp:datagrid>
> <input type="submit" value="Submit Query" runat="server" />
> </form>
> </body>
> </html>
>
> Temp.cs code:
> ==========
> using System;
> using System.Web;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Data;
> using System.Data.OleDb;
> public class dgrdAccountSort : Page
> {
> private string SortExpression;
> protected DataGrid grdAccount;
> protected void Page_Load(object Src, EventArgs e)
> {
> BindGridReader();
> }
>
> public void BindGridReader()
> {
> string SelectCommand = "SELECT * FROM AcctName";
> if (SortExpression != null)
> SelectCommand += " ORDER BY " + SortExpression;
> OleDbConnection conn = new OleDbConnection(@."Provider=vfpoledb.1;User
> Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> );
> OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> conn.Open();
> IDataReader reader = cmd.ExecuteReader();
> grdAccount.DataSource = reader;
> grdAccount.DataBind();
> conn.Dispose();
> }
> }
Just a thought - have you tried closing the connection by setting the
commandbehavior of your command to do so after the Datareader is closed. And
then close the datareader after binding?

"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> Hi All,
> I've got the following .aspx file with the then following .cs code. The
> page renders fine on first run, but once I click the submit, it just comes
> back with a cannot be displayed page indicating that the page is not
> available. Anyone see what probably obvious or stupid thing I'm missing?
> TIA,
> John
> Test.aspx:
> ========
> <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:datagrid id="grdAccount" runat="server" Height="100%"
> Width="100%"></asp:datagrid>
> <input type="submit" value="Submit Query" runat="server" />
> </form>
> </body>
> </html>
>
> Temp.cs code:
> ==========
> using System;
> using System.Web;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Data;
> using System.Data.OleDb;
> public class dgrdAccountSort : Page
> {
> private string SortExpression;
> protected DataGrid grdAccount;
> protected void Page_Load(object Src, EventArgs e)
> {
> BindGridReader();
> }
>
> public void BindGridReader()
> {
> string SelectCommand = "SELECT * FROM AcctName";
> if (SortExpression != null)
> SelectCommand += " ORDER BY " + SortExpression;
> OleDbConnection conn = new OleDbConnection(@."Provider=vfpoledb.1;User
> Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> );
> OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> conn.Open();
> IDataReader reader = cmd.ExecuteReader();
> grdAccount.DataSource = reader;
> grdAccount.DataBind();
> conn.Dispose();
> }
> }
Just a thought - have you tried closing the connection by setting the
commandbehavior of your command to do so after the Datareader is closed. And
then close the datareader after binding?

"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> Hi All,
> I've got the following .aspx file with the then following .cs code. The
> page renders fine on first run, but once I click the submit, it just comes
> back with a cannot be displayed page indicating that the page is not
> available. Anyone see what probably obvious or stupid thing I'm missing?
> TIA,
> John
> Test.aspx:
> ========
> <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:datagrid id="grdAccount" runat="server" Height="100%"
> Width="100%"></asp:datagrid>
> <input type="submit" value="Submit Query" runat="server" />
> </form>
> </body>
> </html>
>
> Temp.cs code:
> ==========
> using System;
> using System.Web;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Data;
> using System.Data.OleDb;
> public class dgrdAccountSort : Page
> {
> private string SortExpression;
> protected DataGrid grdAccount;
> protected void Page_Load(object Src, EventArgs e)
> {
> BindGridReader();
> }
>
> public void BindGridReader()
> {
> string SelectCommand = "SELECT * FROM AcctName";
> if (SortExpression != null)
> SelectCommand += " ORDER BY " + SortExpression;
> OleDbConnection conn = new OleDbConnection(@."Provider=vfpoledb.1;User
> Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> );
> OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> conn.Open();
> IDataReader reader = cmd.ExecuteReader();
> grdAccount.DataSource = reader;
> grdAccount.DataBind();
> conn.Dispose();
> }
> }
John,

Sorry, but that was the only thing I could see that might have been wrong
with your code...

That said, I mostly program in VB.Net so maybe someone with more C#
experience could spot something else to try.

Good luck with it!

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche

"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:e1doDH0aDHA.1280@.tk2msftngp13.phx.gbl...
> Thanks for getting involved! Unfortunately, I inserted a conn.Close()
> before the conn.Dispose() and it appears to do the same thing (work first
> time then die the second).
> FWIW, I'm using WebMatrix, the 1.1 version of .NET framework on a Win2K
pro
> machine.
> - John
> "S. Justin Gengo" <sjgengo@.aboutfortunate.com> wrote in message
> news:#wLKf6zaDHA.388@.TK2MSFTNGP10.phx.gbl...
> > John,
> > Instead of Connection.Dispose();
> > Use Connection.Close(); and then Connection.Dispose() instead.
> > Connection.Dispose() tells the .Net garbage collector that it's okay to
> > dispose of an object when it gets around to it. It does not close the
> > connection.
> > Sincerely,
> > --
> > S. Justin Gengo, MCP
> > Web Developer
> > Free code library at:
> > www.aboutfortunate.com
> > "Out of chaos comes order."
> > Nietzche
> > "John Spiegel" <jspiegel@.c-comld.com> wrote in message
> > news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> > > Hi All,
> > > > I've got the following .aspx file with the then following .cs code.
The
> > > page renders fine on first run, but once I click the submit, it just
> comes
> > > back with a cannot be displayed page indicating that the page is not
> > > available. Anyone see what probably obvious or stupid thing I'm
> missing?
> > > > TIA,
> > > > John
> > > > Test.aspx:
> > > ========
> > > > <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> > > <html>
> > > <head>
> > > </head>
> > > <body>
> > > <form runat="server">
> > > <asp:datagrid id="grdAccount" runat="server" Height="100%"
> > > Width="100%"></asp:datagrid>
> > > <input type="submit" value="Submit Query" runat="server" />
> > > </form>
> > > </body>
> > > </html>
> > > > > Temp.cs code:
> > > ==========
> > > using System;
> > > using System.Web;
> > > using System.Web.UI;
> > > using System.Web.UI.WebControls;
> > > using System.Data;
> > > using System.Data.OleDb;
> > > > public class dgrdAccountSort : Page
> > > {
> > > private string SortExpression;
> > > protected DataGrid grdAccount;
> > > > protected void Page_Load(object Src, EventArgs e)
> > > {
> > > BindGridReader();
> > > }
> > > > > public void BindGridReader()
> > > {
> > > string SelectCommand = "SELECT * FROM AcctName";
> > > if (SortExpression != null)
> > > SelectCommand += " ORDER BY " + SortExpression;
> > > > OleDbConnection conn = new
OleDbConnection(@."Provider=vfpoledb.1;User
> > > Id=;Password=;Data
> Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> > > );
> > > OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> > > > conn.Open();
> > > IDataReader reader = cmd.ExecuteReader();
> > > grdAccount.DataSource = reader;
> > > grdAccount.DataBind();
> > > > conn.Dispose();
> > > }
> > > }
> >
John,

Sorry, but that was the only thing I could see that might have been wrong
with your code...

That said, I mostly program in VB.Net so maybe someone with more C#
experience could spot something else to try.

Good luck with it!

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche

"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:e1doDH0aDHA.1280@.tk2msftngp13.phx.gbl...
> Thanks for getting involved! Unfortunately, I inserted a conn.Close()
> before the conn.Dispose() and it appears to do the same thing (work first
> time then die the second).
> FWIW, I'm using WebMatrix, the 1.1 version of .NET framework on a Win2K
pro
> machine.
> - John
> "S. Justin Gengo" <sjgengo@.aboutfortunate.com> wrote in message
> news:#wLKf6zaDHA.388@.TK2MSFTNGP10.phx.gbl...
> > John,
> > Instead of Connection.Dispose();
> > Use Connection.Close(); and then Connection.Dispose() instead.
> > Connection.Dispose() tells the .Net garbage collector that it's okay to
> > dispose of an object when it gets around to it. It does not close the
> > connection.
> > Sincerely,
> > --
> > S. Justin Gengo, MCP
> > Web Developer
> > Free code library at:
> > www.aboutfortunate.com
> > "Out of chaos comes order."
> > Nietzche
> > "John Spiegel" <jspiegel@.c-comld.com> wrote in message
> > news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> > > Hi All,
> > > > I've got the following .aspx file with the then following .cs code.
The
> > > page renders fine on first run, but once I click the submit, it just
> comes
> > > back with a cannot be displayed page indicating that the page is not
> > > available. Anyone see what probably obvious or stupid thing I'm
> missing?
> > > > TIA,
> > > > John
> > > > Test.aspx:
> > > ========
> > > > <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> > > <html>
> > > <head>
> > > </head>
> > > <body>
> > > <form runat="server">
> > > <asp:datagrid id="grdAccount" runat="server" Height="100%"
> > > Width="100%"></asp:datagrid>
> > > <input type="submit" value="Submit Query" runat="server" />
> > > </form>
> > > </body>
> > > </html>
> > > > > Temp.cs code:
> > > ==========
> > > using System;
> > > using System.Web;
> > > using System.Web.UI;
> > > using System.Web.UI.WebControls;
> > > using System.Data;
> > > using System.Data.OleDb;
> > > > public class dgrdAccountSort : Page
> > > {
> > > private string SortExpression;
> > > protected DataGrid grdAccount;
> > > > protected void Page_Load(object Src, EventArgs e)
> > > {
> > > BindGridReader();
> > > }
> > > > > public void BindGridReader()
> > > {
> > > string SelectCommand = "SELECT * FROM AcctName";
> > > if (SortExpression != null)
> > > SelectCommand += " ORDER BY " + SortExpression;
> > > > OleDbConnection conn = new
OleDbConnection(@."Provider=vfpoledb.1;User
> > > Id=;Password=;Data
> Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> > > );
> > > OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> > > > conn.Open();
> > > IDataReader reader = cmd.ExecuteReader();
> > > grdAccount.DataSource = reader;
> > > grdAccount.DataBind();
> > > > conn.Dispose();
> > > }
> > > }
> >
Not yet, I'll give it a shot! I did find some very similar code code that
is working so I can use it to find my mistake. Thanks for the advice, Rick!

- John

"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message
news:#uNhx04aDHA.2436@.TK2MSFTNGP12.phx.gbl...
> Just a thought - have you tried closing the connection by setting the
> commandbehavior of your command to do so after the Datareader is closed.
And
> then close the datareader after binding?
> "John Spiegel" <jspiegel@.c-comld.com> wrote in message
> news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> > Hi All,
> > I've got the following .aspx file with the then following .cs code. The
> > page renders fine on first run, but once I click the submit, it just
comes
> > back with a cannot be displayed page indicating that the page is not
> > available. Anyone see what probably obvious or stupid thing I'm
missing?
> > TIA,
> > John
> > Test.aspx:
> > ========
> > <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> > <html>
> > <head>
> > </head>
> > <body>
> > <form runat="server">
> > <asp:datagrid id="grdAccount" runat="server" Height="100%"
> > Width="100%"></asp:datagrid>
> > <input type="submit" value="Submit Query" runat="server" />
> > </form>
> > </body>
> > </html>
> > Temp.cs code:
> > ==========
> > using System;
> > using System.Web;
> > using System.Web.UI;
> > using System.Web.UI.WebControls;
> > using System.Data;
> > using System.Data.OleDb;
> > public class dgrdAccountSort : Page
> > {
> > private string SortExpression;
> > protected DataGrid grdAccount;
> > protected void Page_Load(object Src, EventArgs e)
> > {
> > BindGridReader();
> > }
> > public void BindGridReader()
> > {
> > string SelectCommand = "SELECT * FROM AcctName";
> > if (SortExpression != null)
> > SelectCommand += " ORDER BY " + SortExpression;
> > OleDbConnection conn = new OleDbConnection(@."Provider=vfpoledb.1;User
> > Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> > );
> > OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> > conn.Open();
> > IDataReader reader = cmd.ExecuteReader();
> > grdAccount.DataSource = reader;
> > grdAccount.DataBind();
> > conn.Dispose();
> > }
> > }
Not yet, I'll give it a shot! I did find some very similar code code that
is working so I can use it to find my mistake. Thanks for the advice, Rick!

- John

"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message
news:#uNhx04aDHA.2436@.TK2MSFTNGP12.phx.gbl...
> Just a thought - have you tried closing the connection by setting the
> commandbehavior of your command to do so after the Datareader is closed.
And
> then close the datareader after binding?
> "John Spiegel" <jspiegel@.c-comld.com> wrote in message
> news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> > Hi All,
> > I've got the following .aspx file with the then following .cs code. The
> > page renders fine on first run, but once I click the submit, it just
comes
> > back with a cannot be displayed page indicating that the page is not
> > available. Anyone see what probably obvious or stupid thing I'm
missing?
> > TIA,
> > John
> > Test.aspx:
> > ========
> > <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> > <html>
> > <head>
> > </head>
> > <body>
> > <form runat="server">
> > <asp:datagrid id="grdAccount" runat="server" Height="100%"
> > Width="100%"></asp:datagrid>
> > <input type="submit" value="Submit Query" runat="server" />
> > </form>
> > </body>
> > </html>
> > Temp.cs code:
> > ==========
> > using System;
> > using System.Web;
> > using System.Web.UI;
> > using System.Web.UI.WebControls;
> > using System.Data;
> > using System.Data.OleDb;
> > public class dgrdAccountSort : Page
> > {
> > private string SortExpression;
> > protected DataGrid grdAccount;
> > protected void Page_Load(object Src, EventArgs e)
> > {
> > BindGridReader();
> > }
> > public void BindGridReader()
> > {
> > string SelectCommand = "SELECT * FROM AcctName";
> > if (SortExpression != null)
> > SelectCommand += " ORDER BY " + SortExpression;
> > OleDbConnection conn = new OleDbConnection(@."Provider=vfpoledb.1;User
> > Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> > );
> > OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> > conn.Open();
> > IDataReader reader = cmd.ExecuteReader();
> > grdAccount.DataSource = reader;
> > grdAccount.DataBind();
> > conn.Dispose();
> > }
> > }
I appreciate the time looking into it! It's been a long time since I've
picked up a new language so now I'm trying to basically do two at once!
Yea! <g
"S. Justin Gengo" <sjgengo@.aboutfortunate.com> wrote in message
news:#Xz3CQ6aDHA.2672@.tk2msftngp13.phx.gbl...
> John,
> Sorry, but that was the only thing I could see that might have been wrong
> with your code...
> That said, I mostly program in VB.Net so maybe someone with more C#
> experience could spot something else to try.
> Good luck with it!
> Sincerely,
> --
> S. Justin Gengo, MCP
> Web Developer
> Free code library at:
> www.aboutfortunate.com
> "Out of chaos comes order."
> Nietzche
>
> "John Spiegel" <jspiegel@.c-comld.com> wrote in message
> news:e1doDH0aDHA.1280@.tk2msftngp13.phx.gbl...
> > Thanks for getting involved! Unfortunately, I inserted a conn.Close()
> > before the conn.Dispose() and it appears to do the same thing (work
first
> > time then die the second).
> > FWIW, I'm using WebMatrix, the 1.1 version of .NET framework on a Win2K
> pro
> > machine.
> > - John
> > "S. Justin Gengo" <sjgengo@.aboutfortunate.com> wrote in message
> > news:#wLKf6zaDHA.388@.TK2MSFTNGP10.phx.gbl...
> > > John,
> > > > Instead of Connection.Dispose();
> > > > Use Connection.Close(); and then Connection.Dispose() instead.
> > > > Connection.Dispose() tells the .Net garbage collector that it's okay
to
> > > dispose of an object when it gets around to it. It does not close the
> > > connection.
> > > > Sincerely,
> > > > --
> > > S. Justin Gengo, MCP
> > > Web Developer
> > > > Free code library at:
> > > www.aboutfortunate.com
> > > > "Out of chaos comes order."
> > > Nietzche
> > > > > "John Spiegel" <jspiegel@.c-comld.com> wrote in message
> > > news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> > > > Hi All,
> > > > > > I've got the following .aspx file with the then following .cs code.
> The
> > > > page renders fine on first run, but once I click the submit, it just
> > comes
> > > > back with a cannot be displayed page indicating that the page is not
> > > > available. Anyone see what probably obvious or stupid thing I'm
> > missing?
> > > > > > TIA,
> > > > > > John
> > > > > > Test.aspx:
> > > > ========
> > > > > > <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> > > > <html>
> > > > <head>
> > > > </head>
> > > > <body>
> > > > <form runat="server">
> > > > <asp:datagrid id="grdAccount" runat="server" Height="100%"
> > > > Width="100%"></asp:datagrid>
> > > > <input type="submit" value="Submit Query" runat="server" />
> > > > </form>
> > > > </body>
> > > > </html>
> > > > > > > > Temp.cs code:
> > > > ==========
> > > > using System;
> > > > using System.Web;
> > > > using System.Web.UI;
> > > > using System.Web.UI.WebControls;
> > > > using System.Data;
> > > > using System.Data.OleDb;
> > > > > > public class dgrdAccountSort : Page
> > > > {
> > > > private string SortExpression;
> > > > protected DataGrid grdAccount;
> > > > > > protected void Page_Load(object Src, EventArgs e)
> > > > {
> > > > BindGridReader();
> > > > }
> > > > > > > > public void BindGridReader()
> > > > {
> > > > string SelectCommand = "SELECT * FROM AcctName";
> > > > if (SortExpression != null)
> > > > SelectCommand += " ORDER BY " + SortExpression;
> > > > > > OleDbConnection conn = new
> OleDbConnection(@."Provider=vfpoledb.1;User
> > > > Id=;Password=;Data
> > > Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> > > > );
> > > > OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> > > > > > conn.Open();
> > > > IDataReader reader = cmd.ExecuteReader();
> > > > grdAccount.DataSource = reader;
> > > > grdAccount.DataBind();
> > > > > > conn.Dispose();
> > > > }
> > > > }
> > > > > >
FYI, As it turns out, the error seems to be tied to my not limiting the
amount of the table it displayed on the page. Once I narrowed it down to 20
rows at a time, the error went away. I'm not clear as to whether that's a
configurable limitation or not.

- John

"John Spiegel" <jspiegel@.c-comld.com> wrote in message
news:uoAcTxzaDHA.652@.tk2msftngp13.phx.gbl...
> Hi All,
> I've got the following .aspx file with the then following .cs code. The
> page renders fine on first run, but once I click the submit, it just comes
> back with a cannot be displayed page indicating that the page is not
> available. Anyone see what probably obvious or stupid thing I'm missing?
> TIA,
> John
> Test.aspx:
> ========
> <%@. Page Language="C#" src="http://pics.10026.com/?src=Temp.cs" Inherits="dgrdAccountSort" %>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:datagrid id="grdAccount" runat="server" Height="100%"
> Width="100%"></asp:datagrid>
> <input type="submit" value="Submit Query" runat="server" />
> </form>
> </body>
> </html>
>
> Temp.cs code:
> ==========
> using System;
> using System.Web;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Data;
> using System.Data.OleDb;
> public class dgrdAccountSort : Page
> {
> private string SortExpression;
> protected DataGrid grdAccount;
> protected void Page_Load(object Src, EventArgs e)
> {
> BindGridReader();
> }
>
> public void BindGridReader()
> {
> string SelectCommand = "SELECT * FROM AcctName";
> if (SortExpression != null)
> SelectCommand += " ORDER BY " + SortExpression;
> OleDbConnection conn = new OleDbConnection(@."Provider=vfpoledb.1;User
> Id=;Password=;Data
Source=C:\temp\dotnet1.1\asp\essentials\samples\my testing\IntelligentOffice"
> );
> OleDbCommand cmd = new OleDbCommand( SelectCommand, conn );
> conn.Open();
> IDataReader reader = cmd.ExecuteReader();
> grdAccount.DataSource = reader;
> grdAccount.DataBind();
> conn.Dispose();
> }
> }

Saturday, March 24, 2012

Newbie: Upload large file from client to server in ASP.NET

I have seen many posts for this same subject, but my project has some
odd requirements. I need to develop an ASP app that will upload a
large file (200 MB+) to a server without any user interaction, meaning
I can's simply put a file input box on the page and let the user
choose the file. I basically need them to click a button and have the
file transferred. I know that this would be a dangerous practice if
anyone could do it, but is it possible in a controlled environment?
Because of the size of the file I have been looking at FTPing it, but
can't figure out how to get client script to start the FTP. I have
also found this code (below) that utilizes a web service, but I don't
see how the client-script would get the file from the client since it
appears to be ASP. Any ideas for this situation would be MUCH
appreciated.

<WebMethod()> PublicFunction UploadFile(ByVal fs()AsByte,ByVal
FlNameAsString)AsString
Try
Dim m As New MemoryStream(fs)
Dim f As New FileStream("c:\tempUploaded\" & FlName,
FileMode.Create)
m.WriteTo(f)
m.Close()
f.Close()
f = Nothing
m = Nothing
Return "File Uploaded"

Catch ex As Exception
Return ex.Message
End Try
End Function

The UploadFile Webmethod accepts a byte array and the name of the
file, the byte array is copied to a memory stream which is written to
a FileStream.

The client code to upload a file,

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Try
Dim f As System.IO.File
Dim fs As System.IO.FileStream
Dim o As New localhost.Service1()
'file to upload
fs = f.Open("c:\upload.pdf", IO.FileMode.Open, IO.FileAccess.Read)
Dim b(fs.Length - 1) As Byte
fs.Read(b, 0, fs.Length)
MsgBox(o.UploadFile(b, "upload.pdf"))
f = Nothing
fs.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End SubYou can use the HTTP classes to write an upload client as a Winexe, there
are examples in the SDK of how to do this using the webclient uploadfile
method, as shown here.

Console.Write("\nPlease enter the URL to post data to : ");
String uriString = Console.ReadLine();

// Create a new WebClient instance.
WebClient myWebClient = new WebClient();

Console.WriteLine("\nPlease enter the fully qualified path of the
file to be uploaded to the URL");
string fileName = Console.ReadLine();

Console.WriteLine("Uploading {0} to {1} ...",fileName,uriString);
// Upload the file to the URL using the HTTP 1.0 POST.
byte[] responseArray =
myWebClient.UploadFile(uriString,"POST",fileName);

// Decode and display the response.
Console.WriteLine("\nResponse Received.The contents of the file
uploaded are: \n{0}",Encoding.ASCII.GetString(responseArray));

You then need to control your server side timouts, and set your
machine.config settings to control the ma file size permitted for uplaods
(look it up - cant recall all the settings)

If you want to resort to FTP, then you can easily script the FTP.EXE that
comes with windows with the /s flag.

--
Regards

John Timney (Microsoft ASP.NET MVP)
--------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
--------------

"Greg" <greg_leflar@.hotmail.com> wrote in message
news:1651b2f9.0308171354.6c1ee8ae@.posting.google.c om...
> I have seen many posts for this same subject, but my project has some
> odd requirements. I need to develop an ASP app that will upload a
> large file (200 MB+) to a server without any user interaction, meaning
> I can's simply put a file input box on the page and let the user
> choose the file. I basically need them to click a button and have the
> file transferred. I know that this would be a dangerous practice if
> anyone could do it, but is it possible in a controlled environment?
> Because of the size of the file I have been looking at FTPing it, but
> can't figure out how to get client script to start the FTP. I have
> also found this code (below) that utilizes a web service, but I don't
> see how the client-script would get the file from the client since it
> appears to be ASP. Any ideas for this situation would be MUCH
> appreciated.
> <WebMethod()> PublicFunction UploadFile(ByVal fs()AsByte,ByVal
> FlNameAsString)AsString
> Try
> Dim m As New MemoryStream(fs)
> Dim f As New FileStream("c:\tempUploaded\" & FlName,
> FileMode.Create)
> m.WriteTo(f)
> m.Close()
> f.Close()
> f = Nothing
> m = Nothing
> Return "File Uploaded"
> Catch ex As Exception
> Return ex.Message
> End Try
> End Function
> The UploadFile Webmethod accepts a byte array and the name of the
> file, the byte array is copied to a memory stream which is written to
> a FileStream.
> The client code to upload a file,
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Try
> Dim f As System.IO.File
> Dim fs As System.IO.FileStream
> Dim o As New localhost.Service1()
> 'file to upload
> fs = f.Open("c:\upload.pdf", IO.FileMode.Open, IO.FileAccess.Read)
> Dim b(fs.Length - 1) As Byte
> fs.Read(b, 0, fs.Length)
> MsgBox(o.UploadFile(b, "upload.pdf"))
> f = Nothing
> fs.Close()
> Catch ex As Exception
> MsgBox(ex.Message)
> End Try
> End Sub
Thank you for your reply. Your code sample makes sense. How would I
then execute that script on the client from an aspx? Again, I don't
know if this is even possible because of the devious implications, but
the client is on our LAN so I have complete control.

"John Timney \(Microsoft MVP\)" <timneyj@.despammed.com> wrote in message news:<OT1XywQZDHA.2668@.TK2MSFTNGP09.phx.gbl>...
> You can use the HTTP classes to write an upload client as a Winexe, there
> are examples in the SDK of how to do this using the webclient uploadfile
> method, as shown here.
> Console.Write("\nPlease enter the URL to post data to : ");
> String uriString = Console.ReadLine();
> // Create a new WebClient instance.
> WebClient myWebClient = new WebClient();
> Console.WriteLine("\nPlease enter the fully qualified path of the
> file to be uploaded to the URL");
> string fileName = Console.ReadLine();
> Console.WriteLine("Uploading {0} to {1} ...",fileName,uriString);
> // Upload the file to the URL using the HTTP 1.0 POST.
> byte[] responseArray =
> myWebClient.UploadFile(uriString,"POST",fileName);
> // Decode and display the response.
> Console.WriteLine("\nResponse Received.The contents of the file
> uploaded are: \n{0}",Encoding.ASCII.GetString(responseArray));
> You then need to control your server side timouts, and set your
> machine.config settings to control the ma file size permitted for uplaods
> (look it up - cant recall all the settings)
> If you want to resort to FTP, then you can easily script the FTP.EXE that
> comes with windows with the /s flag.
> --
> Regards
> John Timney (Microsoft ASP.NET MVP)
> --------------
> <shameless_author_plug>
> Professional .NET for Java Developers with C#
> ISBN:1-861007-91-4
> Professional Windows Forms
> ISBN: 1861005547
> Professional JSP 2nd Edition
> ISBN: 1861004958
> Professional JSP
> ISBN: 1861003625
> Beginning JSP Web Development
> ISBN: 1861002092
> </shameless_author_plug>
> --------------
> "Greg" <greg_leflar@.hotmail.com> wrote in message
> news:1651b2f9.0308171354.6c1ee8ae@.posting.google.c om...
> > I have seen many posts for this same subject, but my project has some
> > odd requirements. I need to develop an ASP app that will upload a
> > large file (200 MB+) to a server without any user interaction, meaning
> > I can's simply put a file input box on the page and let the user
> > choose the file. I basically need them to click a button and have the
> > file transferred. I know that this would be a dangerous practice if
> > anyone could do it, but is it possible in a controlled environment?
> > Because of the size of the file I have been looking at FTPing it, but
> > can't figure out how to get client script to start the FTP. I have
> > also found this code (below) that utilizes a web service, but I don't
> > see how the client-script would get the file from the client since it
> > appears to be ASP. Any ideas for this situation would be MUCH
> > appreciated.
> > <WebMethod()> PublicFunction UploadFile(ByVal fs()AsByte,ByVal
> > FlNameAsString)AsString
> > Try
> > Dim m As New MemoryStream(fs)
> > Dim f As New FileStream("c:\tempUploaded\" & FlName,
> > FileMode.Create)
> > m.WriteTo(f)
> > m.Close()
> > f.Close()
> > f = Nothing
> > m = Nothing
> > Return "File Uploaded"
> > Catch ex As Exception
> > Return ex.Message
> > End Try
> > End Function
> > The UploadFile Webmethod accepts a byte array and the name of the
> > file, the byte array is copied to a memory stream which is written to
> > a FileStream.
> > The client code to upload a file,
> > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles Button1.Click
> > Try
> > Dim f As System.IO.File
> > Dim fs As System.IO.FileStream
> > Dim o As New localhost.Service1()
> > 'file to upload
> > fs = f.Open("c:\upload.pdf", IO.FileMode.Open, IO.FileAccess.Read)
> > Dim b(fs.Length - 1) As Byte
> > fs.Read(b, 0, fs.Length)
> > MsgBox(o.UploadFile(b, "upload.pdf"))
> > f = Nothing
> > fs.Close()
> > Catch ex As Exception
> > MsgBox(ex.Message)
> > End Try
> > End Sub

newbie: web.config problems

Dear reader!

asp.net 2.0

I have a problem with my settings in the web.config file.

This is part of my web.config file:
<roleManager enabled="true" cacheRolesInCookie="true"
cookieName="AHROLES" defaultProvider="AH_RoleProvider">
<providers>
<add name="AH_RoleProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />
</providers>
</roleManager>

I get no compile errors, but when I run the website I get this error:
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23' or one of
its dependencies. The system cannot find the file specified.

Source Error:

Line 52: connectionStringName="LocalSqlServer"
Line 53: applicationName="/"
Line 54: type="System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23" />
Line 55: </providers>
Line 56: </roleManager>

Source File: C:\Documents and Settings\Test\My Documents\Visual Studio
2005\WebSites\HelloWorld\web.config Line: 54

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].

------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42

Any ideas what I'm missing here?Check the connection srings section. You should have a connection string
called LocalSQLServer. Not sure about the rest of it.

The Role manager, et al, can be a bugger to fix. I have had a bear of a time
with them. It is best to go through the docs on MSDN and look at each tag,
one at a time. You can then discern where the error is.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:eWoVp1E2GHA.4632@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

Dear reader!
>
asp.net 2.0
>
I have a problem with my settings in the web.config file.
>
This is part of my web.config file:
<roleManager enabled="true" cacheRolesInCookie="true"
cookieName="AHROLES" defaultProvider="AH_RoleProvider">
<providers>
<add name="AH_RoleProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23" />
</providers>
</roleManager>
>
I get no compile errors, but when I run the website I get this error:
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.
>
Parser Error Message: Could not load file or assembly 'System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58e92a0497700d23' or one
of its dependencies. The system cannot find the file specified.
>
Source Error:
>
>
Line 52: connectionStringName="LocalSqlServer"
Line 53: applicationName="/"
Line 54: type="System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23" />
Line 55: </providers>
Line 56: </roleManager>
>
>
Source File: C:\Documents and Settings\Test\My Documents\Visual Studio
2005\WebSites\HelloWorld\web.config Line: 54
>
Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=58e92a0497700d23' could not be loaded.
>
>
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
>
>
>
>
>
------------------------
>
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42
>
>
Any ideas what I'm missing here?
>

Friday, March 16, 2012

News content to XML file

Hello,
I have been given a task for creating a utility (asp.net/vb.net) exe which
transaltes the news content
into an XML file.

Can some one give me any directions to how we need to do this?

ThanksWhy not consider syndicating your news as an RSS xml file. It will then at
least be in a format and structure easily deciphered.

http://aspnet.4guysfromrolla.com/articles/021804-1.aspx

--
Regards

John Timney (MVP)

"Karthik Natarajan" <nkarthik04@.gmail.com> wrote in message
news:Ok1N4qYkGHA.3816@.TK2MSFTNGP02.phx.gbl...
> Hello,
> I have been given a task for creating a utility (asp.net/vb.net) exe which
> transaltes the news content
> into an XML file.
> Can some one give me any directions to how we need to do this?
>
> Thanks
>