Quick question (I hope

)
So what I want to do, is take a Gridview output and use VB code to switch the alternating row style color based on the number of times (alternating) that a user has submitted information to the application.
This is what I have so far:
CODE
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Photo Routing Database</title>
</head>
<body>
<form id="form1" defaultbutton = "Button1" defaultfocus = "infeed" runat="server">
<div>
<table>
<tr>
<td>
<img src ="RockBrad.bmp" alt = "" align="right"/>
</td>
<td>
<asp:TextBox ID="infeed" runat="server" />
<asp:Button ID="Button1" OnClick ="receive" Text = "Enter Model Number" runat ="server" />
<h2> Photo Routing Database</h2>
<%--<asp:Button onclick="buttonclick1" runat ="server" Text="Enter Model Number" />--%>
<asp:Label ID="tell" Font-Size ="Medium" Font-Bold = "true" runat="server" />
</td>
</tr>
</table>
<asp:GridView ID="GridviewPh" runat="server" AutoGenerateColumns ="false" >
<HeaderStyle BackColor = "#cc0000" />
<RowStyle HorizontalAlign="Center" />
<AlternatingRowStyle BackColor = "#ffff99" />
<Columns>
<asp:BoundField DataField ="Operation" HeaderText ="Operation" />
<asp:BoundField DataField ="Location" HeaderText ="Location" />
<asp:BoundField DataField ="Description" HeaderText ="Description" />
<asp:BoundField DataField ="Area Title" HeaderText ="Area Title" />
<asp:BoundField DataField ="Documentation" HeaderText ="VA" />
<asp:BoundField NullDisplayText ="_____________" HeaderText ="Step Completed [Inital]" />
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
vb
Imports DataSet1TableAdapters
Partial Class _Default
Inherits System.Web.UI.Page
Dim whereval As String
Dim previous1 As String
Dim previous2 As String
Dim previous3 As String
Dim previous4 As String
Dim previous5 As String
Dim thisnum As Integer
Dim msg As String
Public Function look(ByVal thisnum) As String
If (thisnum = 0) Then
Return "LightSlateGrey"
Else
Return "#ffff99"
End If
End Function
Protected Sub receive(ByVal sender As Object, ByVal e As System.EventArgs)
whereval = infeed.Text
Try
tell.Text() = ("Routing for model number: " & whereval)
If (whereval = "") Then
tell.Text = ("You have failed to enter a model number, please try again")
End If
Dim PhOut As New PhotoDBTableAdapter
GridviewPh.DataSource = PhOut.GetDataByPhModel(whereval)
GridviewPh.DataBind()
If (PhOut Is DBNull.Value) Then
tell.Text() = ("Incorrect model number format, please copy the model exactly and try again")
End If
Catch ex As Exception
whereval = "Failed to execute"
End Try
If (thisnum = 0) Then
thisnum = 1
ElseIf (thisnum = 1) Then
thisnum = 0
End If
infeed.Text = ""
End Sub
Sub Main()
thisnum = 0
End Sub
End Class
Ideally, I want to put the function into the line <AlternatingRowStyle BackColor = "#ffff99" /> however I'm not sure that's possible.
Also, I want to use the sub main to hold the value, but I'm concerned that it will just keep outputting for the case that it's zero, as opposed to storing the number of times that it's changed.
Any ideas?
Thanks in advance!