All Questions
116 questions
0
votes
0
answers
9
views
With telerik:RadWizard in RadMultiPage large ViewState causes RadGrid refresh ViewState exception
For a version 7.3 of C#, ASP.Net Web Form app with .Net Framework 4.6.2
I have an ASPX with an ascx loaded with LoadControl
On the ascx, I have
<telerik:RadMultiPage
<telerik:RadPageView 1
...
-1
votes
1
answer
350
views
Validation of Viewstate MAC failed (Shared hosting Plesk)
I am using plesk'shared hosting server to host my website. Constantly getting ViewState MAC failed error
Plesk won't be able to provide any Machine Key. As it is shared hosting.
I have also attached ...
1
vote
0
answers
36
views
I am trying to save different ID per tab and getting different errors and I don't know the cause
I am trying to save information on ViewState to have different ID per tab but I am getting this error and can't figure out what to be the cause of it for a few days now.
When I try to run it without ...
1
vote
0
answers
350
views
How to logging in to asp.net website using node.js
I want to login and get my transcript from my school's website using nodejs. I checked the network flow while logging in. Website uses asp.net and there is __VIEWSTATE __VIEWSTATEGENERATOR and ...
2
votes
1
answer
63
views
How are ViewStates accessible everywhere without being declared?
I was always under the impression that to access a variable in multiple methods, you'd either have to declare it as a class member or pass it in as an argument.
However, I was looking over some sample ...
0
votes
0
answers
202
views
how keys for viewstate decryption is shared with the client?
I've just started to read about viewstate in asp.net. I know it is serialized data encoded with base64 and I know it can also be encrypted using a key[which is Auto-generated every time if we don't ...
1
vote
0
answers
398
views
Error: The message received from the server could not be parsed
We have a legacy ASP.NET 3.5 Web Forms website.
We want to introduce multi-language feature to this old site, and as a short-cut, we are replacing strings in the rendering HTML string inside the ...
0
votes
0
answers
319
views
ASP.NET webforms - saving viewstate to database - viewstate validation doesn't work
We have an ASP.NET 4.8 webforms application that saves the viewstate to database instead of sending it to the client. On postback, the viewstate is restored from the database via a hidden key field.
...
2
votes
1
answer
1k
views
Viewstate list loses data on click row edit in GridView
I am new to using Viewstate in asp Web forms. I have a description drop down menu that I use to show a Gridview.
However, when I click on the edit row button, the Gridview clears all data. From this:
...
0
votes
0
answers
693
views
Invalid length for a Base-64 char array or string. c#
I've been encountering this error message for a while. I tried to replicate the issue and was successful on replicating it by clicking on a wizard button while the loading is still on going. I tried ...
0
votes
1
answer
766
views
Regular Expression Extractor failing in JMeter for asp.net web forms
Using JMeter, I'm attempting to log in to an asp.net web forms application. I recorded the login sequence to a *.jmx file, and now I'm attempting to extract the __VIEWSTATE, __VIEWSTATEGENERATOR and ...
1
vote
1
answer
887
views
Save values in list after click event
When I click on this LinkButton I need to save the object on my list, but if I click again, my list will lost the older value and get list count = 1, any suggestion ?
List<Product> products = ...
2
votes
1
answer
347
views
Where is ViewState store if it is disabled
I have property (in ASP.NET webforms) writen like this:
public string QuickSearchText
{
get
{
string value = (string)ViewState["QuickSearchText"];
return ((value == null) ?...
3
votes
1
answer
11k
views
How to encrypt Viewstate properly in asp.net webform
I am using asp.net webform website which is using 4.5 framework and vunrability scanner show viewstate as Unencrypted __VIEWSTATE parameter
Even though i am using machine key it still flags it
<...
2
votes
0
answers
631
views
"Validation of viewstate MAC failed" only when posting back from a mobile browser that has been idle for sometime
I know that this question has been asked frequently on StackOverflow but my case is a bit different. I checked all the answers related to this issue and none solved my problem as in my case it only ...
4
votes
2
answers
2k
views
Found 2 elements with non-unique id #__VIEWSTATE
I am working on a legacy ASP.NET application that renders two forms on a single web page. Each form implements its own __VIEWSTATE field.
Since Chrome v63 duplicate field names throw an error in the ...
0
votes
1
answer
284
views
Why does my HTML table row loses view state after dynamically adding rows to this table?
I have a simple HTML table like this:
<table id="table" runat="server">
<tr>
<td>
<asp:Label runat="server" Text="Column1" />
</td>
&...
0
votes
1
answer
371
views
How to debug a viewstate validation error in DNN?
I have a DotNetNuke application that I inherited and I'm trying to make some updates to an existing module. It happens to be a custom login module.
I'm trying to integrate 2 factor authentication. ...
0
votes
0
answers
568
views
Asp.net sorting repeater columns
I have a basic repeater on my aspx page with sort that uses viewstate in the code behind. Now this works perfectly fine but then my page starts loading really slow due to the huge viewstate it creates,...
2
votes
1
answer
646
views
Are objects in Web Forms persistent in memory?
I have lots of experience with C#, but I am fairly new to Web Forms.
I am working on a project where a lot of data is stored in the ViewState and I don't understand why.
My understanding is that the ...
0
votes
1
answer
877
views
Asp textbox clear on click
I have some ASP textboxes I want to fill out.
<div class="form-group">
<asp:Label CssClass="form-control-label" ID="LFirstName" Text="First Name"
AssociatedControlID="TBFirstName"...
1
vote
2
answers
366
views
How to save TabContainer to Viewstate?
I've been struggling with saving a TabContainer to a viewstate variable that would load all of the TabPanels of that TabContainer. (Would page be loaded faster?).
Pardon me if the question is not ...
0
votes
1
answer
421
views
Disable ViewState for asp: Linkbutton
I have two link buttons in my index.aspx
<form id="MyForm" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
&...
0
votes
0
answers
56
views
ASP.NET Webforms cause error on submit if listbox item is added by javascript and is selected
I have a listbox which is part of a composite control.
I add items by javascript. If I submit without selecting items(click on one or more of them), it works fine, but if I click on one of the items, ...
1
vote
1
answer
77
views
Odd behavior with dynamically created usercontrols on postback
I'm having some difficulty with my dynamically generated usercontrols retaining their selected values. I have created a usercontrol with several form fields. On the main page I have a button that will ...
1
vote
1
answer
229
views
ViewState overwrites changes on dynamically added UserControl (in Placeholder) on PostBack
In my ASP.NET application - having ViewState enabled - I can reset inputs by simply setting them again. Here is a basic simple sample that works:
_TEST.aspx
<asp:ScriptManager runat="server" /&...
1
vote
2
answers
176
views
Passing HTML that is created as a string on the server to the client in ASP.NET Webforms without using a Literal control
I am generating a lot of HTML as a string in the code-behind of an ASP.NET Webforms page and setting the string to an ASP.NET Literal control like this:
litHTML.Text = strHtml;
However, I noticed ...
0
votes
2
answers
818
views
TextBox inside repeater disappeared when button postback
Hello developers i really need solution for this problem because its my final year social networking site project the problem is
I have a Repeater, inside Repeater i have one textbox and one button
...
0
votes
3
answers
2k
views
First item in listbox always gets read instead of selected (highlighted) item in listbox
Let me try that again here... my Delete function in ASP.NET webform here:
//delete a product from the product list
protected void btn_Del_Click(object sender, EventArgs e)
{
...
1
vote
1
answer
442
views
Can I access curent page viewstate from httpModule
To avoid the known issue of resending request when user clicks on browser's refresh button,
I decided to add a HttpModule where I override the load_Complete method to redirect the page to itself. I ...
1
vote
2
answers
215
views
ListBox implements IPostBackDataHandler but why can't it maintain its state like a TextBox when EnableViewState is set to false?
In this post, Understanding ASP.NET View State, the author says this:
It is a common misconception among developers that view state is somehow responsible for having TextBoxes, CheckBoxes, ...
0
votes
1
answer
144
views
ASP.NET wizard control navigates twice after changing ActiveStepIndex
I have an application with a bunch of wizards. In one of the wizards when the user is on the last step some code runs in the code-behind to check the form's values so far. If there is an issue with ...
8
votes
2
answers
354
views
Can a client get to a button click event programmatically if the button is not rendered? [duplicate]
This is in ASP.NET web forms, I have a save button on a screen. When I load the page initially, under certain conditions, the save button is not rendered.
button1.visible = false
In my button ...
0
votes
1
answer
393
views
Viewstate destroyed after Session timeout
protected override PageStatePersister PageStatePersister
{
get
{
if (System.IO.Path.GetFileName(this.Page.Request.FilePath).Equals("login.aspx") || System.IO.Path....
1
vote
1
answer
109
views
How to Host Portable Class Library Class Instance in ViewState
I have an ASP.NET Web-forms application with two projects: The main Web project and a portable class library project. I have the following code:
In the portable project I have an Item class:
public ...
0
votes
1
answer
231
views
how to stop viewstate going stale?
I have an ASP.NET web forms app which uses HTML5 "Offline Web Apps" technology to store pages in the browser cache for an extended period of time. In this case it's possible for a user to press a ...
0
votes
1
answer
43
views
WebUserControl changes to Viewstate are not accessible at page level
I'm developing an ASP.NET Webforms application and while using the WebUserControl I stumbled upon a behavior I dont understand.
My WebUserControl puts 4 strings into the ViewState:
var projectCode = ...
0
votes
1
answer
360
views
Using Postbacks with a CDN
We have a Sitecore/Webforms based website that we'd like to run behind Akamai CDN however we're having an issue with ViewState MAC validation on our postbacks.
We've worked around this for most of ...
1
vote
0
answers
252
views
Keep __EVENTVALIDATION server side
I'm trying to keep the pagesize of an ASP.NET webforms application as small as possible.
One of the steps was keeping the hidden field values for __VIEWSTATE and __EVENTVALIDATION server side.
...
0
votes
0
answers
64
views
Custom Data class lifecycle
I'm new to web-developing and I'm trying to read a csv file and create a report in Word.I use webform. Code below is my to load file. records is IEnumerable.
if (System.IO.Path.GetExtension(...
1
vote
0
answers
259
views
POST a WebForm with encrypted viewstate
I am working on an application to automate some task we do a lot here. I am using the WebClient class, which I have overridden in order to support cookies.
The first step is to logon to the ...
1
vote
1
answer
651
views
Losing DropDownList items on post back
I have an webforms ASPX page, which has a dynamically added user control. The user control has two DropDownLists, one is in an UpdatePanel as its items depend on the selection in the first ...
1
vote
1
answer
1k
views
How to dynamically add controls and preserve Viewstate?
I'm attempting to use Controls.AddAt(), but it apparently breaks controls at later indexes:
Here's my minimal example:
Aspx put in a form:
<asp:DropDownList runat="server" ID="ddl" />
<asp:...
3
votes
1
answer
225
views
Spoofing IsPostBack
I'm using HtmlAgilityPack as part of an automated process to extract content from existing internal web pages. The problem is that I need to be able to make it think IsPostBack is true.
This is the ...
-1
votes
1
answer
101
views
What sites use Viewstate
Anyone know of any significant websites using VIEWSTATE? Significant being having complex or sizeable viewstate?
I'm working on something to optimize viewstate and after an hour I can't find a single ...
0
votes
1
answer
75
views
Loosing Panel Generated from code behind on postback
I am trying to make a dynamic jquery Tab UI interface that will grow based on my Database values. When I fire a postback I loose my Panel containers and it breaks my jquery. I add the controls on ...
0
votes
1
answer
2k
views
Cannot store List objects into viewstate
I am trying to store some temporary list data so I can let the user edit them before save to database.
public List<ScheduleEntry> NewScheduleEntry
{
get
{
String PersistentName =...
0
votes
0
answers
61
views
If WebForm would be worthless disable ViewState?
I'm a new comer to ASP.NET. Before that, I was a classic ASPer.
As I know:
ViewState use to maintain some complicate-property(sorry for my arbitrary description.Only to differentiate basic property ...
0
votes
1
answer
449
views
Failed to load Viewstate - controls on master page
I have a group of controls on the Master Page. I use as a collection of links(HyperLink controls) to all the pages. When I navigate thru the pages I was setting the specific link to hl.Visible = False ...
1
vote
2
answers
1k
views
EnableViewStateMAC set to false, but received "Validation of viewstate MAC failed" error
I was notified by a client that a website I am maintaining threw this error a few times in quick succession:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster,...