Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Robert Achmann's user avatar
-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 ...
Pranil Dukare's user avatar
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 ...
a user's user avatar
  • 23
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 ...
kutaykurt's user avatar
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 ...
magictester16's user avatar
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 ...
mohammad farhady's user avatar
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 ...
Zafar's user avatar
  • 439
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. ...
ActiveX's user avatar
  • 1,067
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: ...
Kinyanjui Kamau's user avatar
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 ...
Kevin Jacob's user avatar
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 ...
Tom Regan's user avatar
  • 3,831
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 = ...
JNeves's user avatar
  • 41
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) ?...
Earlgray's user avatar
  • 647
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 <...
Learning's user avatar
  • 20k
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 ...
Rami Zebian's user avatar
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 ...
Mark Cooper's user avatar
  • 6,874
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> &...
Powerslave's user avatar
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. ...
Josh Russo's user avatar
  • 3,232
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,...
OptimusPrime's user avatar
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 ...
Jacob's user avatar
  • 467
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"...
Christopher Waugh's user avatar
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 ...
Al_HK's user avatar
  • 65
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"> &...
Ruchi's user avatar
  • 165
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, ...
user1331586's user avatar
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 ...
Wilock's user avatar
  • 49
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" /&...
Martin Braun's user avatar
  • 12.4k
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 ...
Blake Rivell's user avatar
  • 13.8k
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 ...
Kumar's user avatar
  • 41
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) { ...
Michael D. O'Connor's user avatar
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 ...
Stephen's user avatar
  • 1,542
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, ...
renakre's user avatar
  • 8,271
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 ...
Edgar's user avatar
  • 4,488
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 ...
Diskdrive's user avatar
  • 18.8k
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....
user2179088's user avatar
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 ...
yazanpro's user avatar
  • 4,752
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 ...
Andy's user avatar
  • 11.4k
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 = ...
Chrisi's user avatar
  • 381
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 ...
Zhaph - Ben Duguid's user avatar
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. ...
William's user avatar
  • 8,067
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(...
nuDvlpr's user avatar
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 ...
Elad Lachmi's user avatar
  • 10.5k
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 ...
johna's user avatar
  • 10.7k
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:...
Daniel's user avatar
  • 13.1k
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 ...
Underground's user avatar
-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 ...
Peter Oehlert's user avatar
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 ...
jackncoke's user avatar
  • 2,020
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 =...
Yiping's user avatar
  • 1,061
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 ...
jojo's user avatar
  • 315
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 ...
OneFineDay's user avatar
  • 9,024
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,...
Mister Epic's user avatar
  • 16.7k