Murray Brown
asked on
ASP.net VB.net error with Mac Book
Hi
I am getting the following problem only on Mac Books
When users click on the buttons in a Gridview on my ASP.net web form
I have the VB.net code Private Sub GridView2_RowCommand1 at the bottom
that handles the button clicks
I am getting the error
Server Error in '/' Application.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[ViewStateException: Invalid viewstate.
Client IP: 41.189.95.40
Port: 2629
Referer: http://www.webexcel.co/Questions.aspx
Path: /Questions.aspx
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0
ViewState: /wEPDwULLTE0NTQxMDQ2NzEPZB YCZg9kFgIC Aw9kFgYCAQ 8PFgYeCUZv cmVDb2xvcg o7HgRfIVNC AgQeB1Zpc2 libGVnFgIe BXN0eWxlBR Bmb250LXNp emU6TGFyZ2 U7ZAIDDw8W CB4GSGVpZ2 h0GwAAAAAA AF5AAQAAAB 4ISW1hZ2VV cmwFHX4vUm Vzb3VyY2Vz L0xvZ29fSn VwaXRlcjEu anBnHgVXaW R0aBsAAAAA AABeQAEAAA AfAQKAA2Rk AgcPZBYiAg EPDxYCHwUF HH4vUmVzb3 VyY2VzL0dS RUFUX0hlYW Rlci5qcGdk ZAIDDw8WAh 4EVGV4dAUx eW91IGFyZS Bsb2dnZWQg aW4gdW5kZX IgZW1haWwg dG1pY2hpZU BqdXBpdGVy LmNvbWRkAg UPDxYCHwcF CkxvZ2dlZC BpbjpkZAIH Dw8WAh8HBR N0bWljaGll QGp1cGl0ZX IuY29tZGQC CQ8PFgIfBw UDSlVQZGQC Cw8PFgIfB2 VkZAIXDw8W Ah8HBUxQbG Vhc2Ugc2Ny b2xsIGRvd2 4gJiBjb21w bGV0ZSB0aG Ugc3VydmV5 IHF1ZXN0aW 9ucyBiZWxv dy4gVGhlbi BjbGljayAn RG9uZScuZG QCIQ8PFgIf BwUBMWRkAi MPDxYCHwdl ZGQCJQ9kFg gCAQ88KwAR AwAPFgYeC1 8hRGF0YUJv dW5kZx4LXy FJdGVtQ291 bnQCHh8CZ2 QBEBYAFgAW AAwUKwADFg geBE5hbWUF Bk51bWJlch 4KSXNSZWFk T25seWgeBF R5cGUZKwEe CUR...]
[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateExc eption.Thr owError(Ex ception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +198
System.Web.UI.ObjectStateF ormatter.D eserialize (String inputString, Purpose purpose) +432
System.Web.UI.ObjectStateF ormatter.S ystem.Web. UI.IStateF ormatter2. Deserializ e(String serializedState, Purpose purpose) +8
System.Web.UI.Util.Deseria lizeWithAs sert(IStat eFormatter 2 formatter, String serializedState, Purpose purpose) +40
System.Web.UI.HiddenFieldP ageStatePe rsister.Lo ad() +248
System.Web.UI.Page.LoadPag eStateFrom Persistenc eMedium() +88
System.Web.UI.Page.LoadAll State() +36
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +6704
System.Web.UI.Page.Process Request(Bo olean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +245
System.Web.UI.Page.Process Request() +72
System.Web.UI.Page.Process RequestWit hNoAssert( HttpContex t context) +21
System.Web.UI.Page.Process Request(Ht tpContext context) +58
ASP.questions_aspx.Process Request(Ht tpContext context) +37
System.Web.CallHandlerExec utionStep. System.Web .HttpAppli cation.IEx ecutionSte p.Execute( ) +341
System.Web.HttpApplication .ExecuteSt ep(IExecut ionStep step, Boolean& completedSynchronously) +69
<asp:GridView ID="GridView_Questions" runat="server" BackColor="White"
BorderColor="#3366CC" BorderStyle="Solid" BorderWidth="1px" CellPadding="4"
Height="147px" Visible="False" Width="795px">
<Columns>
<asp:TemplateField HeaderText="Strongly Agree" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="#006600"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button6" runat="server"
CommandName="MyButton1"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="Strongly Agree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="#006600" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Agree" HeaderStyle-Font-Size ="Small" ControlStyle-Font-Bold ="false"
ControlStyle-Forecolor ="#009900"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button7" runat="server"
CommandName="MyButton2"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="Agree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="#009900" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Undecided" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="SlateGray"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button8" runat="server"
CommandName="MyButton3"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="Undecided" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="SlateGray" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Disagree" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="#FF6600"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button9" runat="server"
CommandName="MyButton4"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="Disagree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="#FF6600" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Strongly Disagree" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="DarkRed"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button10" runat="server"
CommandName="MyButton5"
CommandArgument="<%# CType(Container,GridViewRo w).RowInde x %>"
Text="Strongly Disagree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="DarkRed" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<HeaderStyle BackColor="White" Font-Bold="False" ForeColor="#000066" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<RowStyle BackColor="White" ForeColor="#003399" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<SortedAscendingCellStyle BackColor="#EDF6F6" />
<SortedAscendingHeaderStyl e BackColor="#0D4AC4" />
<SortedDescendingCellStyle BackColor="#D6DFDF" />
<SortedDescendingHeaderSty le BackColor="#002876" />
</asp:GridView>
Private Sub GridView2_RowCommand1(send er As Object, e As System.Web.UI.WebControls. GridViewCo mmandEvent Args) Handles GridView_Questions.RowComm and
Try
If Me.Label_LoggedIn.Text = "Not logged in" Then
Me.Label_Error1.Text = "Please log in to complete this survey"
Exit Sub
Else
Me.Label_Error1.Text = ""
End If
If (e.CommandName = "MyButton1") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA rgument)
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in dex)
row.Cells(5).BackColor = Drawing.Color.DarkGreen
row.Cells(6).BackColor = Drawing.Color.DarkGreen
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy Brown
End If
ElseIf (e.CommandName = "MyButton2") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA rgument)
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in dex)
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.Green
row.Cells(6).BackColor = Drawing.Color.Green
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy Brown
End If
ElseIf (e.CommandName = "MyButton3") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA rgument)
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in dex)
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.SlateGray
row.Cells(6).BackColor = Drawing.Color.SlateGray
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy Brown
End If
ElseIf (e.CommandName = "MyButton4") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA rgument)
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in dex)
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.DarkOrange
row.Cells(6).BackColor = Drawing.Color.DarkOrange
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy Brown
End If
ElseIf (e.CommandName = "MyButton5") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA rgument)
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in dex)
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.DarkRed
row.Cells(6).BackColor = Drawing.Color.DarkRed
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy Brown
End If
End If
Catch ex As Exception
Me.Label_Error1.Text = ex.Message
End Try
End Sub
I am getting the following problem only on Mac Books
When users click on the buttons in a Gridview on my ASP.net web form
I have the VB.net code Private Sub GridView2_RowCommand1 at the bottom
that handles the button clicks
I am getting the error
Server Error in '/' Application.
--------------------------
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[ViewStateException: Invalid viewstate.
Client IP: 41.189.95.40
Port: 2629
Referer: http://www.webexcel.co/Questions.aspx
Path: /Questions.aspx
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0
ViewState: /wEPDwULLTE0NTQxMDQ2NzEPZB
[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateExc
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.Util.Deseria
System.Web.UI.HiddenFieldP
System.Web.UI.Page.LoadPag
System.Web.UI.Page.LoadAll
System.Web.UI.Page.Process
System.Web.UI.Page.Process
System.Web.UI.Page.Process
System.Web.UI.Page.Process
System.Web.UI.Page.Process
ASP.questions_aspx.Process
System.Web.CallHandlerExec
System.Web.HttpApplication
<asp:GridView ID="GridView_Questions" runat="server" BackColor="White"
BorderColor="#3366CC" BorderStyle="Solid" BorderWidth="1px" CellPadding="4"
Height="147px" Visible="False" Width="795px">
<Columns>
<asp:TemplateField HeaderText="Strongly Agree" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="#006600"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button6" runat="server"
CommandName="MyButton1"
CommandArgument="<%# CType(Container,GridViewRo
Text="Strongly Agree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="#006600" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Agree" HeaderStyle-Font-Size ="Small" ControlStyle-Font-Bold ="false"
ControlStyle-Forecolor ="#009900"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button7" runat="server"
CommandName="MyButton2"
CommandArgument="<%# CType(Container,GridViewRo
Text="Agree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="#009900" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Undecided" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="SlateGray"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button8" runat="server"
CommandName="MyButton3"
CommandArgument="<%# CType(Container,GridViewRo
Text="Undecided" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="SlateGray" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Disagree" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="#FF6600"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button9" runat="server"
CommandName="MyButton4"
CommandArgument="<%# CType(Container,GridViewRo
Text="Disagree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="#FF6600" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Strongly Disagree" HeaderStyle-Font-Size ="Small"
ControlStyle-Font-Bold ="false" ControlStyle-Forecolor ="DarkRed"
ControlStyle-Font-Size ="Smaller">
<ItemTemplate>
<asp:Button ID="Button10" runat="server"
CommandName="MyButton5"
CommandArgument="<%# CType(Container,GridViewRo
Text="Strongly Disagree" />
</ItemTemplate>
<ControlStyle Font-Bold="False" Font-Size="Smaller" ForeColor="DarkRed" />
<HeaderStyle Font-Size="Small" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<HeaderStyle BackColor="White" Font-Bold="False" ForeColor="#000066" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<RowStyle BackColor="White" ForeColor="#003399" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<SortedAscendingCellStyle BackColor="#EDF6F6" />
<SortedAscendingHeaderStyl
<SortedDescendingCellStyle
<SortedDescendingHeaderSty
</asp:GridView>
Private Sub GridView2_RowCommand1(send
Try
If Me.Label_LoggedIn.Text = "Not logged in" Then
Me.Label_Error1.Text = "Please log in to complete this survey"
Exit Sub
Else
Me.Label_Error1.Text = ""
End If
If (e.CommandName = "MyButton1") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in
row.Cells(5).BackColor = Drawing.Color.DarkGreen
row.Cells(6).BackColor = Drawing.Color.DarkGreen
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy
End If
ElseIf (e.CommandName = "MyButton2") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.Green
row.Cells(6).BackColor = Drawing.Color.Green
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy
End If
ElseIf (e.CommandName = "MyButton3") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.SlateGray
row.Cells(6).BackColor = Drawing.Color.SlateGray
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy
End If
ElseIf (e.CommandName = "MyButton4") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.DarkOrange
row.Cells(6).BackColor = Drawing.Color.DarkOrange
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy
End If
ElseIf (e.CommandName = "MyButton5") Then
' Retrieve the row index stored in the CommandArgument property.
Dim index As Integer = Convert.ToInt32(e.CommandA
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView_Questions.Rows(in
'row.BackColor = Drawing.Color.LightGray
row.Cells(5).BackColor = Drawing.Color.DarkRed
row.Cells(6).BackColor = Drawing.Color.DarkRed
row.ForeColor = Drawing.Color.White
Dim Q As Integer = CInt(row.Cells(5).Text)
If Q < 6 Then
row.BackColor = Me.G.ForeColor
ElseIf Q > 5 And Q < 11 Then
row.BackColor = Me.R.ForeColor
ElseIf Q > 10 And Q < 16 Then
row.BackColor = Me.E.ForeColor
ElseIf Q > 15 And Q < 21 Then
row.BackColor = Me.A.ForeColor
ElseIf Q > 20 And Q < 26 Then
row.BackColor = Me.T.ForeColor
ElseIf Q > 25 Then
row.BackColor = System.Drawing.Color.Sandy
End If
End If
Catch ex As Exception
Me.Label_Error1.Text = ex.Message
End Try
End Sub
If http://www.webexcel.co/ is the site you're talking about, it appears to be completely down at the moment.
ASKER
Hi
Sorry about that...the site is up again
Sorry about that...the site is up again
ASKER
Hi I just tried things on another Mac Book and it worked so the error seems specific on one computer
Have you modified the Maximum Worker Process setting in app pool?
ASKER
I don't think so. Should I do that? If so, how would I do that?
No. I have seen a thread where user was getting error after increasing this number.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. It turns out that all of the files hadn't loaded