Mike,
Lots of code there to convert over. My approach would be to start
with a new .aspx page ... take your tables and put in the front end as
<asp:table> and ID your table cell tags so that you can plop stuff in
them or as an alternative put labels or datagrids inside your table
cells and write to those labels. I think once you get started
converting one page it will prove itself to go very quickly. As for
your connection... that is a beautiful thing about the .net design.
You can make your Access connection object in your web config and then
use a single reference when using that connection.
For something like this line:
LOCATION:</b> <font color=""#00ff00"">" & objRS("Location") & "</font></font>"
You could basically replace in your front end like this:
LOCATION:<asp:label id="lblLocation" font-bold=true font-color=#00ff00
runat=server />
In your backend as you pull a datareader you can just assign that
value to lblLocation.text = mydatareader("location")
Once you get started let us know what is hanging you up and we will
give you some direction.
HTH
Ronda
On Tue, 28 Dec 2004 23:49:04 -0500,
[EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I am in the process of converting an aspclassic website I have over to
> asp.net before I do anything more with it. I would like it to do at least
> what it is able to do now. It has custom views I made with aspclassic and
> forms to edit etc.... I am having issues at the moment just making a simple
> connection to a .MDB file. I can go into server explorer and make the
> connection using visual studio .net no problem but its
> LONG....................... I also want to make data generate in the way it
> does not with asp classic. The site is www.belchingtoadclan.com and it is a
> little old but before adding more features to it I want to convert it over.
> Some things are confusing in how to get the same results in .net. Like a page
> to list the members of the gaming clan
>
> http://belchingtoadclan.gotdns.com/btc2/_Scripts/ViewBTCMemberIndex.asp
>
> that lists the members. How can I make the same custom type page generation
> in .net? If you click on a member there is another custom generated page. SO
> far in .net its datagrids etc but that isn't what I need. Here is the code
> from the page listed above its OLD. As far as included content goes I got
> that figured out. Its the building of the page the way it is done now and
> making that happen in .NET - This is the best list there is so I posted here.
> Thank you.
>
> <CODE>
> <%@ Language=VBScript %>
> <% Option Explicit %>
> <!--#include file="adovbs.inc"-->
> <!--#include file="DatabaseConnect.asp"-->
>
> <HTML><head>
>
> <style>
> <!--
> .bodyfont { FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica; FONT-SIZE: 9pt; }
> .lrgheader { FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica; FONT-SIZE: 9pt;
> FONT-WEIGHT: 700; }
> .header { FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica; FONT-SIZE: 8pt;
> FONT-WEIGHT: 700; }
> .content { FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica; FONT-SIZE: 7pt;
> FONT-WEIGHT: 400; }
> -->
> </style>
>
> <STYLE>BODY {
> SCROLLBAR-FACE-COLOR: #000000; SCROLLBAR-HIGHLIGHT-COLOR: #000000;
> SCROLLBAR-SHADOW-COLOR: #000000; SCROLLBAR-ARROW-COLOR: #000000;
> SCROLLBAR-TRACK-COLOR: #000000; SCROLLBAR-DARKSHADOW-COLOR: #000000
> }
> </style>
>
> <style fprolloverstyle>A:hover {color: #00FF00; font-weight: bold}
> </style>
>
> </head>
> <body bgcolor="#000000" text="#C0C0C0" link="#FFFFFF" vlink="#FFFFFF"
> alink="#FFFFFF" background="../_Images/right.gif" bgproperties="fixed">
> <div align="center">
> <table border="0" cellpadding="0" cellspacing="0" width="572">
> <tr>
> <td>
> <!--webbot bot="Include" U-Include="../MenuSystem/Menu.htm" TAG="BODY"
> --></td>
> </tr>
> <tr>
> <td>
> <br>
> <div align="center">
> <div align="center">
> <table border="1" cellpadding="3" cellspacing="0" width="383" id="table3"
> bordercolorlight="#666666" bordercolordark="#333333">
> <tr>
> <td nowrap background="../_Images/Development/metal3Dark.gif">
> <p align="center"><font face="Verdana" size="5" color="#808000">
> <b>B</b>elching
> <b>T</b>oad <b>C</b>lan Members</font></td>
> </tr>
> </table>
> </div>
> </div>
> </td>
> </tr>
> </table>
> </div>
> <%
> 'AUTHOR MIKE BELCHER
> 'THIS WILL LIST THE MEMBERS
> %>
>
> <%
> 'create a SQL statement to list the Events by ProgramStart
>
> Dim strSQL
> strSQL = "SELECT * FROM tblBTC" & " ORDER BY DateJoined"
>
> Dim objRS
> Set objRS = Server.CreateObject("ADODB.Recordset")
> objRS.Open strSQL, objConn
>
> Response.Write "<center><table border=""0"" width=""575"" cellpadding=""0""
> cellspacing=""0"" height=""303"">"
> Response.Write "<tr>"
> Response.Write "<td>"
>
> Dim strLink, strPlayingName, strLocation, strCounter, strEmail
> Response.Write "<BR><BR><center>"
>
> strCounter = 0
> Do While Not objRS.EOF
> strCounter = strCounter + 1
> strPlayingName = objRS("PlayingName")
> strEmail = objRS("Email")
> strPlayingName = Server.URLEncode(strPlayingName)
>
> strPlayingName=Replace(strPlayingName, "~", "%7E")' tilde
> strPlayingName=Replace(strPlayingName, "`", "%60")' `
> strPlayingName=Replace(strPlayingName, "!", "%21")' exclamation
> strPlayingName=Replace(strPlayingName, "@", "%40")' @
> strPlayingName=Replace(strPlayingName, "#", "%23")' pound
> strPlayingName=Replace(strPlayingName, "$", "%24")' dollar sign
> 'strPlayingName=Replace(strPlayingName, "%", "%2525")' percent sign
> strPlayingName=Replace(strPlayingName, "^", "%5E")' exponent
> strPlayingName=Replace(strPlayingName, "&", "%26")' and
> strPlayingName=Replace(strPlayingName, "*", "%2A")' and
> strPlayingName=Replace(strPlayingName, "(", "%28")' (
> strPlayingName=Replace(strPlayingName, ")", "%29")' )
> strPlayingName=Replace(strPlayingName, ",", "%2C")' comma
> strPlayingName=Replace(strPlayingName, "'", "%27")' apostrophe
> strPlayingName=Replace(strPlayingName, "-", "%2D")' dash
> strPlayingName=Replace(strPlayingName, "_", "%5F")' underscore
> strPlayingName=Replace(strPlayingName, "+", "%20")' plus
> strPlayingName=Replace(strPlayingName, "=", "%3D")' equal
> strPlayingName=Replace(strPlayingName, "{", "%7B")' left bracket
> strPlayingName=Replace(strPlayingName, "}", "%7D")' right bracket
> strPlayingName=Replace(strPlayingName, "[", "%5B")' [
> strPlayingName=Replace(strPlayingName, "]", "%5D")' [
> strPlayingName=Replace(strPlayingName, "|", "%7C")' |
> strPlayingName=Replace(strPlayingName, "\", "%5C")' \
> strPlayingName=Replace(strPlayingName, "/", "%2F")' /
> strPlayingName=Replace(strPlayingName, ":", "%3A")' :
> strPlayingName=Replace(strPlayingName, ";", "%3B")' ;
> 'strPlayingName=Replace(strPlayingName, """, "%22")' qoute
> strPlayingName=Replace(strPlayingName, "<", "%3C")' <
> strPlayingName=Replace(strPlayingName, ">", "%3E")' >
> strPlayingName=Replace(strPlayingName, ".", "%2E")' .
>
> Response.Write "<table border=""0"" width=""780"" cellpadding=""3""
> cellspacing=""3"" id=""table2""><tr>"
> Response.Write "<td width=""50""
> background=""../_Images/Development/bg2.gif""><br></td><td>"
> Response.Write "<div align=""center"">"
> Response.Write "<table border=""2"" cellpadding=""3"" cellspacing=""0""
> width=""100%"" align=""left"" id=""table3""
> background=""../_Images/Development/metal3Dark.gif""
> bordercolorlight=""#666666"" bordercolordark=""#333333"" bgcolor=""#292929"">"
> Response.Write "<tr>"
> Response.Write "<td><font face=""Verdana""><B><BIG><BIG>"
> Response.Write "<font size=""5"" color=""#C0C0C0"">"
> Response.Write "<a href='../_scripts/ViewBTCMemberfromindex.asp?" &
> objRS("PlayingName") & "'>" & objRS("PlayingName") &
> "<a/></font></BIG></BIG></B>"
> Response.Write "</font><font color=""#008000""><font face=""Verdana""
> size=""2""><b><br>"
> Response.Write "JOINED: </b><font color=""#00ff00"">" & objRS("DateJoined") &
> "<br></font></font>"
> Response.Write "<font face=""Verdana"" size=""2""
> color=""#008000""><b>NAME:</b><font color=""#00ff00"">" & objRS("Name") &
> "</font></font>"
> Response.Write "<font color=""#008000"" face=""Verdana"" size=""4""><br>"
> Response.Write "</font><font face=""Verdana"" size=""2""
> color=""#008000""><b>AGE:</b> <font color=""#00ff00"">" & objRS("Age") &
> "</font></font>"
> Response.Write "<font face=""Verdana"" size=""4""><br></font></font>"
> Response.Write "<font face=""Verdana"" color=""#008000""
> size=""2""><b>LOCATION:</b> <font color=""#00ff00"">" & objRS("Location") &
> "</font></font>"
> Response.Write "<SMALL><font face=""Verdana""
> color=""#0080FF""><br></FONT></SMALL>"
> Response.Write "<font face=""Verdana"" color=""#008000""
> size=""2""><b>EMAIL:</b> <font color=""#00ff00""><a href='mailto:" & strEmail
> & "?Subject=Mail from BelchingToadClan Members Page'>" & objRS("Email") &
> "</a></font></font>"
> Response.Write "<font face=""Verdana"" size=""4""
> color=""#008000""><br></font>"
> Response.Write "<font face=""Verdana"" color=""#008000""
> size=""2""><b>AIM:</b> <font color=""#00ff00""><A
> href=""aim:goim?screenname=" & objRS("Aim") & """>" & objRS("Aim") &
> "</A></font></font><br>"
> Response.Write "<font face=""Verdana"" size=""2""
> color=""#008000""><b>ICQ:</b><font color=""#00ff00"">" & objRS("Icq") &
> "<br></font>"
> Response.Write "<b>CONNECTION:</b></font><font face=""Verdana"" size=""2""
> color=""#00FF00"">" & objRS("Connect") & "</font>"
> Response.Write "</td>"
> Response.Write "</tr>"
> Response.Write "</table>"
> Response.Write "</div>"
> Response.Write " </td>"
> Response.Write "<td width=""268""
> background=""../_Images/Development/bg2.gif"">"
> Response.Write " </td></tr><tr>"
> Response.Write "<td width=""50"">"
> Response.Write "<br>"
> Response.Write " </td><td>"
> Response.Write " </td>"
> Response.Write "<td width=""268"">"
> Response.Write " </td></tr></table>"
>
> 'Response.Write "<B><img src=""../_Images/sarge.gif"" width=""21""
> height=""32"" border=""0""><BIG><BIG><a class=""roll""
> href='../_scripts/ViewBTCMemberfromindex.asp?" & objRS("PlayingName") & "'>"
> & objRS("PlayingName") & "</a></B></BIG></BIG></FONT><BR> "
> 'Response.Write "<SMALL><font face=""Verdana"" color=""#0080FF"">" &
> objRS("Location") & "</FONT></SMALL><BR>"
> 'Response.Write "<SMALL><a href='mailto:" & strEmail & "?Subject=Mail from
> BelchingToadClan Members Page'>" & objRS("Email") & "</a></B></SMALL>"
> 'Response.Write "<BR><BR><BR>"
> objRS.MoveNext
> Loop
> 'Response.Write "<BIG>THERE ARE CURRENTLY <B>[" & strCounter & "]</B> BTC
> MEMBERS</BIG><br>"
> 'Response.Write "</td>"
> 'Response.Write "</tr><tr><td width=""575""><!--webbot bot=""Include""
> U-Include=""../Footer.htm"" TAG=""BODY"" startspan --></td></table>"
>
> %>
>
> <p> </p>
>
> <%
> objRS.Close
> Set objRS = Nothing
> objConn.Close
> Set objConn = Nothing
> %>
> </FONT>
> <!--webbot bot="Include" U-Include="../MenuSystem/Footer.htm" TAG="BODY" -->
> </BODY>
> </HTML>
> </CODE>
>
> Mike Belcher
> Independant Computer Consultant
>
> Email: [EMAIL PROTECTED]
>
> [Non-text portions of this message have been removed]
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
--
Ronda Pederson
MVP ASP.Net
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/