Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Saturday, March 24, 2012

newbie debug asp

i have .net2002/visual studio and have only used it so far for vb.net
been developing some growing .asp programs that do form processing, running
on a different machine, iis5.0,
and would like to be able to run/debug those under my visual studio
environment, so embarrassed
to say don't even know at this point if its possible, so thats the big
question
and then if thats possible, can i simulate the data being passed from the
web page form for testing the asp program??"bbxrider" <bxtrap01@.comcast.net> wrote in message
news:%238wtxmVaFHA.3400@.tk2msftngp13.phx.gbl...
>i have .net2002/visual studio and have only used it so far for vb.net
> been developing some growing .asp programs that do form processing,
> running
> on a different machine, iis5.0,
> and would like to be able to run/debug those under my visual studio
> environment, so embarrassed
> to say don't even know at this point if its possible, so thats the big
> question
> and then if thats possible, can i simulate the data being passed from the
> web page form for testing the asp program??

Hi,

If you are talking about debugging Classic ASP, it's a freakin nightmare.

If I were you, I wouldn't waste my time. Just fill your code full of
Response.Write()s ... that is actually a hell of a lot more effecient.

THANK GOD for .NET!!!

--
Regards,
John MacIntyre
http://www.johnmacintyre.ca
Specializing in; Database, Web-Applications, and Windows Software
thanks for the reply
i have been using the response.write technique, but ran into some kind of
problem, i think because i executed
wscipt.createobject instead of server.createobject and then could not run
any asp! had to reboot, so was trying
to get around that
is it possible then to rewrite the old asp into asp.net and run that on my
win2k/iis5.0 server??
bbx

"John" <Please.Reply@.To.the.group.com> wrote in message
news:uUovjTWaFHA.3808@.TK2MSFTNGP14.phx.gbl...
> "bbxrider" <bxtrap01@.comcast.net> wrote in message
> news:%238wtxmVaFHA.3400@.tk2msftngp13.phx.gbl...
> >i have .net2002/visual studio and have only used it so far for vb.net
> > been developing some growing .asp programs that do form processing,
> > running
> > on a different machine, iis5.0,
> > and would like to be able to run/debug those under my visual studio
> > environment, so embarrassed
> > to say don't even know at this point if its possible, so thats the big
> > question
> > and then if thats possible, can i simulate the data being passed from
the
> > web page form for testing the asp program??
> Hi,
> If you are talking about debugging Classic ASP, it's a freakin nightmare.
> If I were you, I wouldn't waste my time. Just fill your code full of
> Response.Write()s ... that is actually a hell of a lot more effecient.
> THANK GOD for .NET!!!
>
> --
> Regards,
> John MacIntyre
> http://www.johnmacintyre.ca
> Specializing in; Database, Web-Applications, and Windows Software
"bbxrider" <bxtrap01@.comcast.net> wrote in message
news:u2j9zlWaFHA.464@.TK2MSFTNGP15.phx.gbl...
> is it possible then to rewrite the old asp into asp.net and run that on my
> win2k/iis5.0 server??
> bbx

I have asp.net running on a Win2k/IIS5 machine without problems.
thanks again, sounds like my next project

"John" <Please.Reply@.To.the.group.com> wrote in message
news:%23165n2WaFHA.1456@.TK2MSFTNGP15.phx.gbl...
> "bbxrider" <bxtrap01@.comcast.net> wrote in message
> news:u2j9zlWaFHA.464@.TK2MSFTNGP15.phx.gbl...
> > is it possible then to rewrite the old asp into asp.net and run that on
my
> > win2k/iis5.0 server??
> > bbx
>
> I have asp.net running on a Win2k/IIS5 machine without problems.
>
>
>

newbie debug asp

i have .net2002/visual studio and have only used it so far for vb.net
been developing some growing .asp programs that do form processing, running
on a different machine, iis5.0,
and would like to be able to run/debug those under my visual studio
environment, so embarrassed
to say don't even know at this point if its possible, so thats the big
question
and then if thats possible, can i simulate the data being passed from the
web page form for testing the asp program'"bbxrider" <bxtrap01@.comcast.net> wrote in message
news:%238wtxmVaFHA.3400@.tk2msftngp13.phx.gbl...
>i have .net2002/visual studio and have only used it so far for vb.net
> been developing some growing .asp programs that do form processing,
> running
> on a different machine, iis5.0,
> and would like to be able to run/debug those under my visual studio
> environment, so embarrassed
> to say don't even know at this point if its possible, so thats the big
> question
> and then if thats possible, can i simulate the data being passed from the
> web page form for testing the asp program'
>
Hi,
If you are talking about debugging Classic ASP, it's a freakin nightmare.
If I were you, I wouldn't waste my time. Just fill your code full of
Response.Write()s ... that is actually a hell of a lot more effecient.
THANK GOD for .NET!!!
Regards,
John MacIntyre
http://www.johnmacintyre.ca
Specializing in; Database, Web-Applications, and Windows Software
thanks for the reply
i have been using the response.write technique, but ran into some kind of
problem, i think because i executed
wscipt.createobject instead of server.createobject and then could not run
any asp! had to reboot, so was trying
to get around that
is it possible then to rewrite the old asp into asp.net and run that on my
win2k/iis5.0 server'
bbx
"John" <Please.Reply@.To.the.group.com> wrote in message
news:uUovjTWaFHA.3808@.TK2MSFTNGP14.phx.gbl...
> "bbxrider" <bxtrap01@.comcast.net> wrote in message
> news:%238wtxmVaFHA.3400@.tk2msftngp13.phx.gbl...
the
> Hi,
> If you are talking about debugging Classic ASP, it's a freakin nightmare.
> If I were you, I wouldn't waste my time. Just fill your code full of
> Response.Write()s ... that is actually a hell of a lot more effecient.
> THANK GOD for .NET!!!
>
> --
> Regards,
> John MacIntyre
> http://www.johnmacintyre.ca
> Specializing in; Database, Web-Applications, and Windows Software
>
"bbxrider" <bxtrap01@.comcast.net> wrote in message
news:u2j9zlWaFHA.464@.TK2MSFTNGP15.phx.gbl...
> is it possible then to rewrite the old asp into asp.net and run that on my
> win2k/iis5.0 server'
> bbx
I have asp.net running on a Win2k/IIS5 machine without problems.
thanks again, sounds like my next project
"John" <Please.Reply@.To.the.group.com> wrote in message
news:%23165n2WaFHA.1456@.TK2MSFTNGP15.phx.gbl...
> "bbxrider" <bxtrap01@.comcast.net> wrote in message
> news:u2j9zlWaFHA.464@.TK2MSFTNGP15.phx.gbl...
my
>
> I have asp.net running on a Win2k/IIS5 machine without problems.
>
>
>
>

Friday, March 16, 2012

Newbie needs help

Greetings,

I have been developing with ASP 3.0 and VB6 for the past few years and I decided it was finally time to learn .NET. I have recently purchased VB.NET and I am running on a win2k adv server box using Access 2002 as a back end (I am working on aquiring SQL Server). I am attempting to test my first code in ASP.NET but I am having difficulties. I am hoping somebody may be able to point me in the correct direction. The code I am using is posted below.


<HTML>
<HEAD>
<title>WebForm1</title>
<script language="vb" runat="server">
Sub Page_OnLoad(sender as Object, e as EventArgs)
Response.Write("called")
Dim strConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\inetpub\wwwroot\webapp1\db1.mdb;"

Dim objConn as New OleDbConnection(strConnString)
Dim strSQL as String = "SELECT * FROM Names"
Dim objCmd as new OleDbCommand(strSQL, objConn)

MyDataGrid.DataSource = objCmd.ExecuteReader
MyDataGrid.DataBind()
End Sub

Sub MyButton_OnClick(Sender as Object, e as EventArgs)
Response.Write("called")
End Sub
</script>
</HEAD>
<body>
<form name="frmTest" runat="server">
<asp:Button ID="MyButton" Runat="server" Text="Click Me" />
<asp:DataGrid ID="MyDataGrid" Runat="server" BorderColor=#ff00ff />
</form>
</body>
</HTML>

For some reason when I view this .aspx page the datagrid doesn't show up and neither does the data access portion. Coming from an ASP 3.0 background my first instinct was to place the "response.write" command in the page_load sub to see if that sub was being called correctly. None of the above shows up on the page. However, if I place a plain text box or button it shows up fine. I have searched the forums here and found a few posts that had a similar problem, so I ran the aspnet_regiis -i from the cmd prompt and it installed correctly, but it didn't help my problems any. I also made sure that IIS has this set up as an application. Being new to .NET I am not sure where to go from here and would appreciate any feedback on how to fix this issue.

Regards,
Coreywell the first thin I see is that you are using Page_OnLoad which is incorrect, it is Page_Load. Also you have not opened the connection so just add this before you define your sql string

objConn.Open()

then after you you bind the data, make sure you close the connection using

objConn.Close()

That should solve the problem
Hi,

first off all: response.write was used a lot in classic asp but in asp.net it's nicer to use trace.write (or trace.warn). Make sure that tracing is enabled for the page.

You're probably using webmatrix as a tool so it's better to check out theguided tour first.

Grz, Kris.
Thanks for the replies. I began to experiment with the code behind files and finally figured out that my problem was with the name of my db table name. It was a reserved word and when I surrounded it by "[ ]" it began working properly.

Regards,
Corey