Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with asp pages in 2008 visual studio.

Status
Not open for further replies.

joejack0330

Technical User
Jan 27, 2006
95
0
0
US
We have a lot of .asp pages that we had written in visual studio 2005 and we recently upgraded to visual studio 2008 and having a lot issues. Once we open a page in 2008 and don't even change anything, it seems to change some things around and duplicates some things. The first bit of code below is from vs 2005 and it works fine then then second bit is from 2008 and you can see where it added some stuff and also took out some endspans.

2005 - Good

<html xmlns="<head><title>Priority Drop</title>
<link rel="stylesheet" type="text/css" href="../StyleBlue.css"/>
</head>
<body onload="document.forms.Drop.PalletID.focus()">
<!--webbot bot="Include" U-Include="../IncludeSecurity.asp" TAG="BODY" startspan -->
<!--webbot bot="Include" endspan i-checksum="32" -->
<!--webbot bot="Include" U-Include="../IncludeSQLServer4Connection.asp"
TAG="BODY" startspan -->
<%
strconn="PROVIDER=MSDASQL;DRIVER={SQL Server};"
strconn=strconn & "SERVER=sqlserver4;DATABASE=production4;"
strconn=strconn & "UID=xxxxxxxx;PWD=xxxxxxxxxx;"
%>
<!--webbot bot="Include" endspan i-checksum="5362" -->

<%
'From previous screen

session("Slot") = Trim(Request("Slot"))
session("Facility") = Trim(Request("Facility"))
session("Item") = Trim(Request("Item"))

MySQL = "spGunHiLoItemReserves @Facility ='" & session("Facility") &_
"', @Item ='" & session("Item") & "'"

dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection")
conntemp.open strconn
set rstemp=conntemp.execute(MySQL)
howmanyfields=rstemp.fields.count -1

If session("Message") <> "Priority" Then
Response.Redirect("MainMenu.asp")
End If%>

<table>
<tr>
<td>
<b style="font-size: Large">Priority Drop To Slot <%response.write session("Slot")%></b>
</td>
<td style="width: 25px;"></td>
<td>
<!--webbot bot="Include" U-Include="../IncludeEmployeeInfo.asp" TAG="BODY" startspan -->

<b style="font-size: small">User <%response.write session("UserName")%></b>

<!--webbot bot="Include" endspan i-checksum="28663" -->
</td>
</tr>
</table>
<table>
<tr>
<td>
<form id="MainMenu" method="POST" action="MainMenu.asp">
<input name="MainMenu" type="submit" value="Main Menu" style="width: 74px; height: 43px"/>
</form>
</td>
</tr>
</table>

<form id="Drop" method="POST" action="ValidateDrop.asp">
<table>
<tr>
<td style="width: 25px;"></td>
<td style="font-size: x-small; text-align: center">Pallet ID</td>
<td style="font-size: x-small; text-align: center">Pick Slot</td>
<td style="font-size: x-small; text-align: center">Slot Check #</td>
<td style="width: 25px;"></td>
<td></td>
</tr>
<tr>
<td></td>
<td>
<input name="PalletID" onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}" style="text-align: center; width: 200px; height: 50px; font-size: x-large; vertical-align: middle;" type="text" id="Text1" />
</td>
<td>
<input name="Slot" onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}" style="text-align: center; width: 150px; height: 50px; font-size: x-large; vertical-align: middle;" type="text" id="Text2" />
</td>
<td>
<input name="SlotCheckNumber" onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}" style="text-align: center; width: 75px; height: 50px; font-size: x-large; vertical-align: middle;" type="text" id="Text3" />
</td>
<td></td>
<td>
<input name="Drop" type="submit" value="Drop" style="width: 100px; height: 75px"/>
</td>
</tr>
</table>
</form>
<table>
<tr>
<td>
<b style="font-size: medium">Reserves</b>
</td>
</tr>
</table>
<table>
<tr>
<% 'Put Headings On The Table of Field Names
for i=0 to howmanyfields
%>
<td id="Heading" style="white-space: nowrap;"><%=rstemp(i).name%></td>
<% next %>
</tr>

<% ' Now lets grab all the records
do while not rstemp.eof %>
<tr>
<% for i = 0 to howmanyfields
thisvalue=rstemp(i)
If isnull(thisvalue) then
thisvalue=""
end if %>
<td id="Detail" style="white-space: nowrap;"><%=thisvalue%></td>
<% next %>
</tr>
<%rstemp.movenext
loop%>
</table>

<%
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing%>

</body>
</html>


2008 - No Good

<html xmlns="<head><title>Priority Drop</title>
<link rel="stylesheet" type="text/css" href="../StyleBlue.css"/>
</head>
<body onload="document.forms.Drop.PalletID.focus()">
<!--webbot bot="Include" U-Include="../IncludeSecurity.asp" TAG="BODY" -->
<!--webbot bot="Include" U-Include="../IncludeSQLServer4Connection.asp"
TAG="BODY" -->

<%
'From previous screen

session("Slot") = Trim(Request("Slot"))
session("Facility") = Trim(Request("Facility"))
session("Item") = Trim(Request("Item"))

MySQL = "spGunHiLoItemReserves @Facility ='" & session("Facility") &_
"', @Item ='" & session("Item") & "'"

dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection")
conntemp.open strconn
set rstemp=conntemp.execute(MySQL)
howmanyfields=rstemp.fields.count -1

If session("Mode") <> "Priority" Then
Response.Redirect("MainMenu.asp")
End If%>

<table>
<tr>
<td>
<b style="font-size: Large">Priority Drop To Slot <%response.write session("Slot")%></b>
</td>
<td style="width: 25px;"></td>
<td>
<!--webbot bot="Include" U-Include="../IncludeEmployeeInfo.asp" TAG="BODY" -->
</td>
</tr>
</table>
<table>
<tr>
<td>
<form id="MainMenu" method="POST" action="MainMenu.asp">
<input name="MainMenu" type="submit" value="Main Menu" style="width: 74px; height: 43px"/>
</form>
</td>
</tr>
</table>
<form id="Drop" method="POST" action="ValidateDrop.asp">
<table>
<tr>
<td style="width: 25px;"></td>
<td style="font-size: x-small; text-align: center">Pallet IDe>
<tr>
<td>
<form id="MainMenu" method="POST" action="MainMenu.asp">
<input name="MainMenu" type="submit" value="Main Menu" style="width: 74px; height: 43px"/>
</form>
</td>
</tr>
</table>
<form id="Drop" method="POST" action="ValidateDrop.asp">
<table>
<tr>
<td style="width: 25px;"></td>
<td style="font-size: x-small; text-align: center">Pallet ID</td>
<td style="font-size: x-small; text-align: center">Pick Slot</td>
<td style="font-size: x-small; text-align: center">Slot Check #</td>
<td style="width: 25px;"></td>
<td></td>
</tr>
<tr>
<td></td>
<td>
<input name="PalletID" onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}" style="text-align: center; width: 200px; height: 50px; font-size: x-large; vertical-align: middle;" type="text" id="Text1" />
</td>
<td>
<input name="Slot" onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}" style="text-align: center; width: 150px; height: 50px; font-size: x-large; vertical-align: middle;" type="text" id="Text2" />
</td>
<td>
<input name="SlotCheckNumber" onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}" style="text-align: center; width: 75px; height: 50px; font-size: x-large; vertical-align: middle;" type="text" id="Text3" />
</td>
<td></td>
<td>
<input name="Drop" type="submit" value="Drop" style="width: 100px; height: 75px"/>
</td>
</tr>
</table>
</form>
<table>
<tr>
<td>
<b style="font-size: medium">Reserves</b>
</td>
</tr>
</table>
<table>
<tr>
<% 'Put Headings On The Table of Field Names
for i=0 to howmanyfields
%>
<td id="Heading" style="white-space: nowrap;"><%=rstemp(i).name%></td>
<% next %>
</tr>

<% ' Now lets grab all the records
do while not rstemp.eof %>
<tr>
<% for i = 0 to howmanyfields
thisvalue=rstemp(i)
If isnull(thisvalue) then
thisvalue=""
end if %>
<td id="Detail" style="white-space: nowrap;"><%=thisvalue%></td>
<% next %>
</tr>
<%rstemp.movenext
loop%>
</table>

<%
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing%>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top