Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz....
Help with Invalid postback error pz.... Help with Invalid postback error pz....
Help with Invalid postback error pz....
Go Back  Xtreme Visual Basic Talk > > > Help with Invalid postback error pz....


Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2008, 02:08 PM
TampaBay TampaBay is offline
Centurion
 
Join Date: May 2006
Posts: 143
Default Help with Invalid postback error pz....


On ASP.net page, I filled the combo box with ClientName, then run report, then export that report to Excel. when click export, I got error "Invalid postback...etc"
HERE IS MY CODE:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Request.Cookies("User") Is Nothing Then Response.Redirect("../Index.aspx")
If Trim(cboClientName.Text) = "" Then
Call FillClientName() 'If I take this line out, then hard code when report runs, it is fine. I can export OK too.
End If
If IsPostBack Then
Showreport()
Else
trCrystalReport.Visible = False
End If
End Sub

After google for a while, I decided to try one of the method to get around it but not sure how to do it. hope you can help.
The website suggest:
To fix, modify the web.config file located in the /admin/ folder.
Change this line:
<pages validateRequest="false" />
To:
<pages validateRequest="false" enableEventValidation="false" />

The problem is on my config file, I don't have that line.
My pages section look like this:
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Web"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Data"/>
<add namespace="System.Data.SqlClient"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Drawing"/>
<add namespace="System.Data"/>
</namespaces>
</pages>

How can I change it?
Or is there another way to get around it?
thanks.
Reply With Quote
  #2  
Old 12-21-2008, 12:29 PM
Targe Targe is offline
Contributor
 
Join Date: Nov 2006
Posts: 615
Default

What does FillClientName() do? Also, you don't need to say "Call" in front of it. That's more of a VB6 thing.

As for those EnableEventValidation and ValidateRequest, those are usually added to the top of the asp page. I've never seen them in the web.config before...but if it says to do it, you can try.
Code:
<pages ValidateRequest="false" EnableEventValidation="false" />
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Web"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Data"/>
<add namespace="System.Data.SqlClient"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Drawing"/>
<add namespace="System.Data"/>
</namespaces>
</pages>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz.... Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz.... Help with Invalid postback error pz....
Help with Invalid postback error pz....
Help with Invalid postback error pz....
 
Help with Invalid postback error pz....
Help with Invalid postback error pz....
 
-->