p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   Best book for going from ASP to ASPX? (http://p2p.wrox.com/showthread.php?t=3)

Klom Dark June 3rd, 2003 11:16 AM

Best book for going from ASP to ASPX?
Which is the best book for existing, experienced 'old-style' ASP coders to quickly translate their thinking process to the new ASPX method? Something with lots of example translations: Here's how you did X in ASP, here's how to do the same thing with best practices of ASPX...

stu9820 June 3rd, 2003 01:48 PM

It depends if you are using VB.NET or C#.NET though you aren't limited to just those 2.


Klom Dark June 3rd, 2003 05:26 PM

Yes, that's a good book, I've got the C# version. :)

My biggest confusion at this time is adapting to how to work with the database objects. I hate adding/editing info with raw SQL statements. Could someone show me how to translate the following ASP code into C#-based ASPX code? I am confused on talking to ODBC, and the syntax on ADO objects. Thanks! :D

    Set dbConn = Server.CreateObject("ADODB.Connection")
    dbConn.Open "DSN=ROTFOH;uid=xxxxxxx;pwd=xxxxxxx"

    Set rsMonster = CreateObject("ADODB.Recordset")
    rsMonster.Open "Monster", dbConn, adOpenStatic, adLockOptimistic


    rsMonster("Descr") = Request.Form("Descr")
    rsMonster("AC") = Request.Form("AC")
    rsMonster("HD") = Request.Form("HD")
    rsMonster("NumAppearing") = Request.Form("NumAppearing")
    rsMonster("DamageH") = Request.Form("DamageH")
    rsMonster("DamageL") = Request.Form("DamageL")
    rsMonster("AttackDesc") = Request.Form("AttackDesc")
    rsMonster("AttPerRound") = Request.Form("AttPerRound")


    Response.Write("Monster Record Created!<p>")
    Response.Write("<form action=AdminMonsterEditor.asp method=post>")
    Response.Write("<input type=submit value='Monster Editor'>")

All times are GMT -4. The time now is 02:56 AM.

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