Multipage - navigation

C

Child

I have a page which has a tabbstrip and a multipage. The tab strip works
great, and navigates the multipage no problem. However, I have a situation
where I would like to have a "hidden" multipage thats not navigated to via
the tabstrip and I am running into trouble.

i see that supposedly I can do this with multipage.selectedindex = myindex
but that doesnt' appear to work for me. I was wondering if I could use both
the tabstrip and navigate via code, or if there is something in my code
forcing the multipage to display the first one. If I use the tabstrip,
should I also be able to force the multipage I want to see via code?

What I am trying to accomplish is I have multiple places in the site where I
need to see the details of some record - its a restaurant review site, so
the data is really quite simple, but people need to be able to search,
browse, add a review to an existing restaurant, click to see details from
the top five restaurants and click to see details from the latest review.
All of those functions go to exactly the same display (multipage) - a
details page which shows information about the restaurant, a summary of all
users reviews and allows the current user to add or edit their own review.
So I need to be able to drill down to that display from a hyperlink control,
a hyperlink column on a datagrid and when an item is selected in a
dropdownlist. Any suggestions how to accomplish would be appreciated. I
would love to keep the application to one page. Its so counterintuitive to
my cold fusion fusebox days that its giving me great pleasure to have one
page where everything lives.

I am attaching the page code although its a bit long, so it might not simple
to wade through -

<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="IEControls" Namespace="Microsoft.Web.UI.Webcontrols"
Assembly="Microsoft.web.ui.webcontrols" %>
<%@ import Namespace="system.data.sqlclient" %>
<%@ import Namespace="system.data" %>
<script runat="server">

Sub Page_Load(byval sender as object, byval e as eventargs)
if not ispostback then
TopFiveNewest

lblWelcome.text="Welcome, " & session("username") & "!"
txtReviewer.text= session("username")

end if



rdetail




end sub

Sub TopFiveNewest()
dim DBConn as SQLConnection
dim DBCommand as SQLDataAdapter
dim SQL as string
dim DSPageData as New Dataset

DBConn= New SQLConnection("server=SQL;" _
& "Initial Catalog = RestaurantReviews;" _
& "User ID = ;" _
& "Password = ;")

sql="Select * from vwTop5 order by Rating DESC"
DBCommand = New SQLDataAdapter(sql, dbconn)
DBCommand.Fill(Dspagedata, "Top5")

sql="Select * from vwNewest"
DBCommand = New SQLDataAdapter(sql, dbconn)
DBCommand.Fill(Dspagedata, "Newest")

sql = "SELECT RName, RestaurantID from tblRestaurants order by
RName"

dbcommand=new sqldataadapter(sql, dbconn)
dbcommand.fill(dspagedata, "AllRs")

sql="select * from tblRAtings order by RatingID DESC"

dbcommand=new sqldataadapter(sql,dbconn)
dbcommand.fill(dspagedata, "Ratings")

sql="select * from tblTypes order by Type"

dbcommand=new sqldataadapter(sql, dbconn)
dbcommand.fill(dspagedata, "Types")

rblType.datasource=dspagedata.tables("Types").defaultview
rblType.databind()

dgTop5.datasource=DSpagedata.tables("Top5").defaultview
dgTop5.databind

ddlRestaurants.datasource =
dspagedata.tables("AllRs").defaultview
ddlRestaurants.databind()

rblRating.datasource=dspagedata.tables("Ratings").defaultview
rblrating.databind()

lblRName.text =
DSpagedata.tables("Newest").rows(0).Item("RNAme")
lblReview.text =
DSpagedata.tables("Newest").rows(0).Item("Description")
hlNewest.text="Read More..."
hlnewest.NavigateURL = "default.aspx?RestaurantID=" &
DSpagedata.tables("Newest").rows(0).Item("RestaurantID")



End Sub




Sub ddlRestaurants_Changed(sender as object, e as eventargs)
dim urlstring as string
urlstring= "RDetails.aspx?RestaurantID=" &
ddlrestaurants.selecteditem.value
response.redirect(urlstring)

End sub


Sub btnSearch_Click(sender as object, e as eventargs)
dim DBConn as SQLConnection
dim DBCommand as SQLDataAdapter
dim SQL as string
dim DSPageData as New Dataset

DBConn= New SQLConnection("server=SQL;" _
& "Initial Catalog = RestaurantReviews;" _
& "User ID = ;" _
& "Password = ;")

sql="SELECT tblRestaurants.RName, tblRestaurants.RestaurantID,
AVG(tblReviews.Rating) AS Rating, tblTypes.Type FROM tblRestaurants INNER
JOIN tblReviews ON tblRestaurants.RestaurantID = tblReviews.RestaurantID
INNER JOIN tblTypes ON tblRestaurants.Type = tblTypes.TypeID GROUP BY
tblRestaurants.RName, tblRestaurants.RestaurantID, tblRestaurants.Type,
tblTypes.Type having RName LIKE '" & txtsearchstring.text & "%'"
DBCommand = New SQLDataAdapter(sql, dbconn)
DBCommand.Fill(Dspagedata, "SearchResults")
if dspagedata.tables("searchresults").rows.count = 0 then
dgresults.visible=false
lblcountrows.text ="Your search returned " &
dspagedata.tables("searchresults").rows.count & " restaurants."
else
lblcountrows.text ="Your search returned " &
dspagedata.tables("searchresults").rows.count & " restaurants."
dgresults.visible=true
lblcountrows.visible=true

dgresults.datasource=dspagedata.tables("searchresults").defaultview
dgresults.databind
end if


end sub


Sub btnAddNewType_Click (sender as object, e as eventargs)
dim dbconn as sqlconnection
dim dbADD as new sqlcommand
dim dbcommand as new sqldataadapter
dim sql as string
dim dspagedata as new dataset

DBConn= New SQLConnection("server=SQL;" _
& "Initial Catalog = RestaurantReviews;" _
& "User ID = ;" _
& "Password = ;")


sql = "INSERT INTO tblTypes (Type) VALUES ('" & txtNewType.text &
"')"
dbadd.commandtext=sql
dbadd.connection=dbconn
dbadd.connection.open
dbadd.executenonquery()

sql="select * from tblTypes order by Type"

dbcommand=new sqldataadapter(sql, dbconn)
dbcommand.fill(dspagedata, "Types")
rbltype.datasource=dspagedata.tables("Types").defaultview
rbltype.databind
txtnewtype.text=""

End Sub

Sub btnAddNewRestaurant_Click (sender as object, e as eventargs)
dim dbconn as sqlconnection
dim dbadd as new sqlcommand




DBConn= New SQLConnection("server=SQL;" _
& "Initial Catalog = RestaurantReviews;" _
& "User ID = ;" _
& "Password = ;")



DBAdd.CommandText="Exec AddRestaurant " _
& "'" & replace(txtRName.text, "'", "''") _
& "', " _
& "'" & replace(txtDescription.text, "'", "''") _
& "', " _
& "'" & replace(txtLocation.text, "'", "''") _
& "', " _
& replace(rbltype.selecteditem.value, "'", "''") _
& ", " _
& "'" & replace(txtInspectionURL.text, "'", "''") _
& "', " _
& "'" & replace(txtComments.text, "'", "''") _
& "', " _
& replace(rblRating.Selecteditem.value, "'", "''") _
& ", " _
& "'" & replace(txtReviewer.text, "'", "''") _
& "'"
dbadd.connection=dbconn
dbadd.connection.open
dbadd.executenonquery()

topfivenewest
lblAddResults.text = "Restaurant " & txtRname.text & " has been
added to the database!"
txtRName.text=""
txtDescription.text = ""
txtLocation.text =""
txtInspectionURL.text=""
rblrating.selectedindex=-1
rbltype.selectedindex=-1



End Sub

Sub rblRating_Changed (sender as object, e as eventargs)
imgrotten.visible=false
imgsoso.visible=false
imgfair.visible=false
imggood.visible=false
imgexcellent.visible=false
select case rblrating.selecteditem.value
case 1
imgrotten.visible=true
case 2
imgsoso.visible=true
case 3
imgfair.visible=true

case 4
imggood.visible=true
case 5
imgexcellent.visible=true
end select

end sub


Sub RDetail()
dim DBConn as SQLConnection
dim DBCommand as SQLDataAdapter
dim SQL as string
dim DSPageData as New Dataset

DBConn= New SQLConnection("server=SQL;" _
& "Initial Catalog = RestaurantReviews;"
_
& "User ID = ;" _
& "Password = ;")

sql="Select * from vwDetails where RestaurantID = " &
Request.QueryString("RestaurantID")
DBCommand = New SQLDataAdapter(sql, dbconn)
DBCommand.Fill(Dspagedata, "Details")

sql="SELECT tblReviews.Reviewer, tblReviews.Rating,
tblRatings.RatingName, tblReviews.Comments fROM tblReviews INNER JOIN
tblRatings ON tblReviews.Rating = tblRatings.RatingID where RestaurantID = "
& Request.QueryString("RestaurantID")
DBCommand = New SQLDataAdapter(sql, dbconn)
DBCommand.Fill(Dspagedata, "Reviews")

sql="SELECT vwRatings.Rating, tblRatings.RatingName FROM
vwRatings INNER JOIN tblRatings ON vwRatings.Rating = tblRatings.RatingID
Where RestaurantID = " & Request.QueryString("RestaurantID")
dbcommand = new sqldataadapter(sql,dbconn)
dbcommand.fill(dspagedata, "Average")

sql="SELECT * from TblRAtings order by RatingID"
dbcommand= new sqldataadapter(sql,dbconn)
dbcommand.fill(dspagedata, "RAtings")

sql="SELECT * from TblReviews where Reviewer = '" &
Session("username") & "' AND RestaurantID = " &
Request.QueryString("RestaurantID")
dbcommand=new sqldataadapter(Sql, dbconn)
dbcommand.fill(dspagedata, "MyReview")


rblMyRatings.datasource=dspagedata.tables("Ratings").defaultview
rblMyRatings.databind


dgReviews.datasource=dspagedata.tables("Reviews").defaultview
dgreviews.databind


if dspagedata.tables("MyReview").rows.count = 1 then
lblIreviewed.text= "You have already reviewed this
restaurant. To change your review fill in the form below."
btnAddReview.text = "Edit My Review"
dim myrating as integer
myrating =
dspagedata.tables("MyReview").rows(0).item("Rating")
rblmyratings.items.findbyvalue(myrating).selected =
true

if
dspagedata.tables("MyReview").rows(0).item("Comments") is dbnull.value then
else
txtMytComments.text =
dspagedata.tables("MyReview").rows(0).item("Comments")
end if
else
lblIReviewed.text = "You have not yet reviewed this
restaurant. To add your review, fill out the form below and click the
button"
btnAddReview.text = "Add My Review"
end if


lblRNameDetails.text=dspagedata.tables("details").rows(0).item("RNAme")

lblType.text=dspagedata.tables("details").rows(0).item("Type")

lblDescription.text=dspagedata.tables("details").rows(0).item("Description")
lblAddedBy.text="Added by: " &
dspagedata.tables("details").rows(0).item("AddedBy")
lblDateTimeAdded.text="Date Time Added: " &
dspagedata.tables("details").rows(0).item("DateTimeAdded")
lblAvgRating.text =
dspagedata.tables("average").rows(0).item("RatingName")
imgrottendetails.visible=false
imgsosodetails.visible=false
imgfairdetails.visible=false
imggooddetails.visible=false
imgexcellentdetails.visible=false

Select case
dspagedata.tables("average").rows(0).item("Rating")
case 1
imgRottendetails.visible=true

case 2
imgsosodetails.visible=true

case 3
imgfairdetails.visible=true

case 4
imggooddetails.visible=true

case 5
imgexcellentdetails.visible=true

End Select

End Sub

Sub BtnAddReview_Click(sender as object, e as eventargs)

end sub

</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Alaska Restaurant Reviews</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
<link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body bgcolor="#999966">
<form runat="server">
<table cellspacing="0" cellpadding="0" width="700" border="0">
<tbody>
<tr>
<td colspan="2">
<img src="images/papayaheader.jpg" /></td>
</tr>
<tr>
<td valign="top" width="120">
<IECONTROLS:TABSTRIP id="Navigation" runat="server"
tabselectedstyle="color:eae046;background-color:999966;font-family:Arial;fon
t-size:13px;font-weight:bold"
tabhoverstyle="color:eae046;background-color:999966;font-family:Arial;font-s
ize:13px;font-weight:bold"
tabdefaultstyle="color:black;background-color:999966;font-family:Arial;font-
size:13px;font-weight:bold" targetid="major" autopostback="true"
orientation="vertical" width="80">
<IECONTROLS:TABSEPARATOR />
<IECONTROLS:TAB id="home" runat="server"
text="Home" tooltip="Go Home" />
<IECONTROLS:TABSEPARATOR />
<IECONTROLS:TAB id="Browse" runat="server"
text="Browse" tooltip="Browse restaurants by type, rating or reviewer" />
<IECONTROLS:TABSEPARATOR />
<IECONTROLS:TAB id="Search" runat="server"
text="Search" tooltip="Search for a restaurant by name" />
<IECONTROLS:TABSEPARATOR />
<IECONTROLS:TAB id="Review" runat="server"
text="Review" tooltip="Review or add a restaurant" />
<IECONTROLS:TABSEPARATOR />
<IECONTROLS:TAB id="Details" runat="server"
text="Details" tooltip="Review or add a restaurant" />
</IECONTROLS:TABSTRIP>
</td>
<td width="580">
<IECONTROLS:MULTIPAGE id="major" runat="server">
<IECONTROLS:pAGEVIEW id="homepage"
runat="server">
<div id="NewestAddedLayer"
style="BORDER-RIGHT: black thin solid; BORDER-TOP: black thin solid;
Z-INDEX: 1; BACKGROUND: #ffff66; LEFT: 102px; FLOAT: right; MARGIN-LEFT: 5%;
BORDER-LEFT: black thin solid; WIDTH: 578px; BORDER-BOTTOM: black thin
solid; POSITION: absolute; TOP: 139px; HEIGHT: 446px">
<table cellpadding="3" width="100%">
<tbody>
<tr>
<td valign="top"
rowspan="2">
<asp:Label
id="lblWelcome" runat="server"></asp:Label></td>
<td>
<asp:Label
id="Top5Label" runat="server" width="194px" font-size="14px"
font-names="Arial" font-bold="True"> Top
5</asp:Label>
<br />
<asp:DataGrid
id="dgTop5" runat="server" font-size="10pt" cellpadding="3"
alternatingitemstyle-forecolor="999966"
alternatingitemstyle-backcolor="white" showfooter="false" showheader="true"
backcolor="beige" font-name="Arial Narrow" bordercolor="black"
autogeneratecolumns="false" headerstyle-font-bold="true"
headerstyle-forecolor="beige" headerstyle-backcolor="999966"
forecolor="999966">
<columns>
<asp:boundcolumn
visible="false" datafield="RestaurantID" />
<asp:boundcolumn
headertext="Name" datafield="RName" />
<asp:boundcolumn
headertext="Rating" datafield="ratingName" />

<asp:hyperlinkcolumn headertext="View Details"
DatanavigateURLField="RestaurantID"
Datanavigateurlformatstring="default.aspx?MPageIndex=4&RestaurantID={0}"
text="View Details" />
</columns>
</asp:DataGrid>
</td>
</tr>
<tr>
<td width="200">
<asp:Label
id="lblNewest" runat="server" width="194px" font-size="14px"
font-names="Arial" font-bold="True">Newest

Review</asp:Label><asp:Label id="lblRname" runat="server" font-size="10pt"
font-names="Arial" font-bold="True" forecolor="Black"></asp:Label>
<br />
<br />
<asp:Label
id="lblReview" runat="server" font-size="9.5pt"
font-names="Arial"></asp:Label>
<br />
<asp:HyperLink
id="hLNewest" runat="server" Font-Names="Arial"
Font-Size="9.5pt"></asp:HyperLink>
</td>
</tr>
</tbody>
</table>
</div>
</IECONTROLS:pAGEVIEW>
<IECONTROLS:pAGEVIEW id="browsepage"
runat="server">
<div id="NewestAddedLayer"
style="BORDER-RIGHT: black thin solid; BORDER-TOP: black thin solid;
Z-INDEX: 1; BACKGROUND: #ffff66; LEFT: 102px; FLOAT: right; MARGIN-LEFT: 5%;
BORDER-LEFT: black thin solid; WIDTH: 578px; BORDER-BOTTOM: black thin
solid; POSITION: absolute; TOP: 139px; HEIGHT: 446px">
<table cellpadding="3">
<tbody>
<tr>
<td>
Browse by Type, or
Ratings
</td>
</tr>
</tbody>
</table>
</div>
</IECONTROLS:pAGEVIEW>
<IECONTROLS:pAGEVIEW id="searchpage"
runat="server">
<div id="SearchLAyer" style="BORDER-RIGHT:
black thin solid; BORDER-TOP: black thin solid; Z-INDEX: 1; BACKGROUND:
#ffff66; LEFT: 102px; FLOAT: right; MARGIN-LEFT: 5%; BORDER-LEFT: black thin
solid; WIDTH: 578px; BORDER-BOTTOM: black thin solid; POSITION: absolute;
TOP: 139px; HEIGHT: 446px">
<table cellpadding="3">
<tbody>
<tr>
<td>
<asp:Label
id="lblSearch" runat="server" text="Search for a
Restaurant"></asp:Label></td>
</tr>
<tr>
<td>
<br />
<asp:TextBox
id="txtsearchstring" runat="server"></asp:TextBox>
<asp:Button
id="btnSearch" onclick="btnSearch_Click" runat="server"
Text="Search"></asp:Button>
<br />
<asp:Label
id="lblcountrows" runat="server" visible="false"></asp:Label>
<asp:DataGrid
id="dgresults" runat="server" font-size="10pt" cellpadding="3"
alternatingitemstyle-forecolor="999966"
alternatingitemstyle-backcolor="white" showfooter="false" showheader="true"
backcolor="beige" font-name="Arial Narrow" bordercolor="black"
autogeneratecolumns="false" headerstyle-font-bold="true"
headerstyle-forecolor="beige" headerstyle-backcolor="999966"
forecolor="999966">
<columns>
<asp:boundcolumn
visible="false" datafield="restaurantid" />
<asp:boundcolumn
headertext="Name" datafield="RName" />
<asp:boundcolumn
headertext="Type" datafield="Type" />
<Asp:boundcolumn
headertext="Rating" datafield="Rating" />

<asp:hyperlinkcolumn headertext="View Details"
DatanavigateURLField="RestaurantID"
Datanavigateurlformatstring="RDetails.aspx?RestaurantID={0}" text="View
Details" />
</columns>
</asp:DataGrid>
</td>
</tr>
</tbody>
</table>
</div>
</IECONTROLS:pAGEVIEW>
<IECONTROLS:pAGEVIEW id="reviewpage"
runat="server">
<div id="ReviewLayer" style="BORDER-RIGHT:
black thin solid; BORDER-TOP: black thin solid; Z-INDEX: 1; BACKGROUND:
#ffff66; LEFT: 93px; FLOAT: right; MARGIN-LEFT: 5%; BORDER-LEFT: black thin
solid; WIDTH: 578px; BORDER-BOTTOM: black thin solid; POSITION: absolute;
TOP: 139px; HEIGHT: 446px">
<table style="WIDTH: 551px; HEIGHT:
278px" cellpadding="3">
<tbody>
<tr>
<td colspan="3">
<h5>Review a restaurant
already in the database:
</h5>
<asp:DropDownList
id="ddlrestaurants" runat="server" autopostback="true"
datavaluefield="RestaurantID" datatextfield="RNAme"
onselectedindexchanged="ddlRestaurants_Changed"></asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="3">
<p>
<asp:Label
id="lblAddResults" runat="server" font-bold="True"
forecolor="Maroon"></asp:Label>
</p>
<h5>Add a new restaurant
to the database:
</h5>
<p></p>
</td>
</tr>
<tr>
<td>
<h6>Name
</h6>
</td>
<td colspan="2">
<asp:TextBox
id="txtRname" runat="server" Width="257px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<h6>Type:
</h6>
</td>
<td colspan="2">
<asp:radiobuttonlist
id="rblType" runat="server" datavaluefield="TypeID" datatextfield="Type"
RepeatColumns="4"></asp:radiobuttonlist>
<br />
<asp:TextBox
id="txtNewType" runat="server"></asp:TextBox>
<asp:Button
id="btnAddType" onclick="btnAddNewType_Click" runat="server" Text="Add New
Type"></asp:Button>
</td>
</tr>
<tr>
<td>
<h6>Location
</h6>
</td>
<td colspan="2">
<asp:TextBox
id="txtLocation" runat="server" Width="257px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<h6>Inspection URL
</h6>
</td>
<td colspan="2">
<asp:TextBox
id="txtInspectionURL" runat="server" Width="257px"></asp:TextBox>
&nbsp; <a
href="http://dining.ci.anchorage.ak.us/esan/" target="_blank">Start
Here</a></td>
</tr>
<tr>
<td>
<h6>Description
</h6>
</td>
<td colspan="2">
<asp:TextBox
id="txtDescription" runat="server" Width="421px" Height="118px"
TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<h6>Rating
</h6>
</td>
<td>
<asp:RadioButtonList
id="rblRating" runat="server" onselectedindexchanged="rblRating_Changed"
RepeatColumns="1" DataTextField="RatingName" DataValueField="RatingID"
AutoPostBack="True"></asp:RadioButtonList>
</td>
<td valign="center">
<asp:Image
id="imgExcellent" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/8/8_8_10.gif"
Visible="False"></asp:Image>
<asp:Image id="imgGood"
runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/4/4_17_206.gif"
Visible="False"></asp:Image>
<asp:Image id="imgFair"
runat="server" ImageUrl="http://smileys.smileycentral.com/cat/4/4_12_6.gif"
Visible="False"></asp:Image>
<asp:Image id="imgSoSo"
runat="server" ImageUrl="http://smileys.smileycentral.com/cat/4/4_13_4.gif"
Visible="False"></asp:Image>
<asp:Image
id="imgRotten" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/4/4_11_6.gif"
Visible="False"></asp:Image>
</td>
</tr>
<tr>
<td>
<h6>Comments
</h6>
</td>
<td colspan="2">
<asp:TextBox
id="txtComments" runat="server" Width="419px" Height="53px"
TextMode="MultiLine"></asp:TextBox>
<asp:TextBox
id="txtReviewer" runat="server" visible="false"></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td align="middle"
colspan="2">
<asp:Button
id="btnAddNewRestaurant" onclick="BtnAddNewRestaurant_Click" runat="server"
Text="Add New Restaurant to Database"></asp:Button>
</td>
</tr>
</tbody>
</table>
</div>
</IECONTROLS:pAGEVIEW>
<IECONTROLS:pAGEVIEW id="RDetails"
runat="server">
<div id="NewestAddedLayer"
style="BORDER-RIGHT: black thin solid; BORDER-TOP: black thin solid;
Z-INDEX: 1; BACKGROUND: #ffff66; LEFT: 102px; FLOAT: right; MARGIN-LEFT: 5%;
BORDER-LEFT: black thin solid; WIDTH: 578px; BORDER-BOTTOM: black thin
solid; POSITION: absolute; TOP: 139px">
<table style="WIDTH: 565px"
cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td>
<asp:Label
id="lblRNameDetails" runat="server" font-size="Large" font-bold="True"
forecolor="Maroon"></asp:Label></td>
<td valign="center">
<p align="center">
<asp:Image
id="imgExcellentDetails" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/8/8_8_10.gif"
Visible="False"></asp:Image>
<asp:Image
id="imgGoodDetails" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/4/4_17_206.gif"
Visible="False"></asp:Image>
<asp:Image
id="imgFairDetails" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/4/4_12_6.gif"
Visible="False"></asp:Image>
<asp:Image
id="imgSoSoDetails" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/4/4_13_4.gif"
Visible="False"></asp:Image>
<asp:Image
id="imgRottenDetails" runat="server"
ImageUrl="http://smileys.smileycentral.com/cat/4/4_11_6.gif"
Visible="False"></asp:Image>
<br />
<asp:Label
id="lblAvgRating" runat="server" font-size="Medium"
forecolor="#400000"></asp:Label>
</p>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label id="lblType"
runat="Server" font-size="Medium" forecolor="#004000"></asp:Label></td>
</tr>
<tr>
<td colspan="2">
<asp:Label
id="lblDescription" runat="server" font-size="Small"
forecolor="#004000"></asp:Label></td>
</tr>
<tr>
<td colspan="2">
<asp:Label
id="lblDateTimeAdded" runat="server"></asp:Label>&nbsp;&nbsp;&nbsp;
<asp:Label id="lblAddedBy" runat="server"></asp:Label></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<asp:Label
id="lblMYReview" runat="server" font-size="Medium" forecolor="#400000">My
Review:</asp:Label>
<br />
<asp:Label
id="lblIreviewed" runat="server"></asp:Label></td>
</tr>
<tr>
<td colspan="2">
<blockquote dir="ltr"
style="MARGIN-RIGHT: 0px">Rating:<br />
<asp:RadioButtonList
id="rblMyRatings" runat="server" DataTextField="RatingName"
DataValueField="RatingID"
RepeatDirection="Horizontal"></asp:RadioButtonList>
</blockquote></td>
</tr>
<tr>
<td colspan="2">
<blockquote dir="ltr"
style="MARGIN-RIGHT: 0px">Comments:
<br />
<asp:TextBox
id="txtMytComments" runat="server" Width="504px"
Height="52px"></asp:TextBox>
</blockquote></td>
</tr>
<tr>
<td colspan="2">
<p align="center">
<asp:Button
id="btnAddReview" onclick="btnAddReview_Click" runat="server" Text="Add My
Reivew"></asp:Button>
</p>
</td>
</tr>
<tr>
<td colspan="2">
<h6>All Reviews:
</h6>
</td>
</tr>
<tr>
<td colspan="2">
<blockquote dir="ltr"
style="MARGIN-RIGHT: 0px">
<p>
<asp:datagrid
id="dgreviews" runat="server" width="500px"
alternatingitemstyle-forecolor="999966"
alternatingitemstyle-backcolor="white" showfooter="false" showheader="true"
backcolor="beige" font-name="Arial Narrow" bordercolor="black"
autogeneratecolumns="false" headerstyle-font-bold="true"
headerstyle-forecolor="beige" headerstyle-backcolor="999966"
forecolor="999966">
<columns>

<asp:boundcolumn headertext="Reviewer" datafield="Reviewer" />

<asp:boundcolumn headertext="Comments" datafield="Comments" />

<asp:boundcolumn headertext="Rating" datafield="ratingname" />
</columns>
</asp:datagrid>
</p>
</blockquote></td>
</tr>
</tbody>
</table>
</div>
</IECONTROLS:pAGEVIEW>
</IECONTROLS:MULTIPAGE>
</td>
</tr>
</tbody>
</table>
<div>
</div>
</form>
</body>
</html>
 
L

Lucas Tam

<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="IEControls"
Namespace="Microsoft.Web.UI.Webcontrols"
Assembly="Microsoft.web.ui.webcontrols" %> <%@ import
Namespace="system.data.sqlclient" %> <%@ import
Namespace="system.data" %> <script runat="server">

One more thing... why don't you use codebehind?
 
L

Lucas Tam

Any suggestions how to accomplish would be appreciated. I
would love to keep the application to one page.

It's tough to make .NET run all one one page... but with work I guess it
could be done. I'm not sure how memory usage would be, as the server would
have to load a large class just to run a small portion of he site.

But check out ASP MasterPages. It's a templating solution for ASP.NET which
works very well (this version is Paul Wilson's Upgraded MasterPages):

http://authors.aspalliance.com/PaulWilson/Articles/?id=14

VS.NET 2005 will include MasterPages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top