Now i am facing a problem on data list. I try to create a select button in data list or repeater to select full message. for the first i create the data list without the linkbutton the page is works. but once i added a linkbutton the system give me an error said thatValidation 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.
below is my source code:
I am using master page as well.
<asp:PanelVisible="false"ID="CategoryNews"runat="server"Width="100%"><pclass="h4"><asp:LabelID="CategoryLabel"runat="server"Text=""></asp:Label></p><asp:DataListID="CategoryNewsList"OnItemCommand="CategoryNewsList_ItemCommand"runat="server"DataSourceID="AccessDataSource3"DataKeyField="newsId"><ItemTemplate><pclass="h4">Date: <%
#Eval("publishDate","{0:dd MMMM yyyy}")%><pclass="p1"><%
# Eval("title")%></p><asp:LinkButtonID="LinkButton1"CommandName="Select"runat="server">Read</asp:LinkButton><pclass="p1"><%#Eval("content")%></p></ItemTemplate></asp:DataList><asp:AccessDataSourceID="AccessDataSource3"runat="server"DataFile="~/App_Data/NewsDB.mdb"SelectCommand="SELECT * FROM [TBNews] WHERE ([catId] = ?) AND [status]=True"><SelectParameters><asp:QueryStringParameterName="catId"QueryStringField="cat"Type="Int32"/></SelectParameters></asp:AccessDataSource></asp:Panel>does anybody know the problem?
you know *for sure* that you aren't using a web farmoh thanks a lot rexlin for your information.
No comments:
Post a Comment