Questions tagged [loadviewstate]
9 questions
3
votes
2 answers
LoadViewState not fired on my user control
I have a user control nested in a repeater.
Inside my user control I have another repeater and in that I have a panel.
I am trying to override the LoadViewState event of my user control and dynamically add controls to the panel. I want to do it…

Jeremy
- 44,950
- 68
- 206
- 332
1
vote
0 answers
Why Does Asp.Net UserControl Get An "F" With ViewState?
I've never had much of a need for UserControls until recently. The reason is too lengthy and out of scope for this thread.
I will say that the UserControls have to be loaded dynamically. The variable in which to load the UserControls is stored in a…

RichardB
- 239
- 2
- 4
- 12
1
vote
1 answer
Can I explicitly force asp.NET to re-load the ViewState data of any data-control?
I have a problem regarding to asp.net lifecylce hierarchy.
Basically, I have one user control which has a GridView in it. And this GridView is dynamically generated based on a public property on the control (named Parameter in the simplified code…

pencilCake
- 51,323
- 85
- 226
- 363
1
vote
1 answer
How to bind values in usercontrol dropdownlist?
I bind the values in usercontrol dropdownlist
But when I add the usercontrol row that time values are not binded in dropdownlist
Code:
.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TimesheetUserControl.ascx.cs"…

user2500094
- 1,033
- 6
- 23
- 42
0
votes
1 answer
How to do a viewstate in Javascript?
I'm new to Javascript,
I'm using the Javascript to get the file name from the FileUpload,
Here with my screenshot.
and my code
$('#Q1DocPath').change(function () {
var path = $(this).val();
if (path != '' && path…

Eng Soon Cheah
- 257
- 1
- 10
- 42
0
votes
0 answers
How to set state of controls from viewstate on non PostBack page
I am currently saving viewstate of pages in cache.
I can see that viewstate is rebinding values and controls on PostBack.
It is working properly on postback.
However, I need to recreate state on a non-post back page.The key i'm using for loading…

cesara
- 842
- 1
- 7
- 19
0
votes
2 answers
ViewState doesn't remember value from previous page init
What am I doing wrong here. I can't get ViewState to work:
protected void Page_Init(object sender, EventArgs e)
{
Method1();
}
private void Method1()
{
Element.Click += new EventHandler(Button_Click);
}
public void…

roger morre
- 27
- 7
0
votes
2 answers
Object reference null in LoadViewState?
When I check if button is clicked or not in LoadViewState
I got this error
Object reference null
In the below code if I click Add Experience button when
eTarget = Request.Params["btnAddVisa"].ToString(); get null error
Code:
protected override…

user2500094
- 1,033
- 6
- 23
- 42
0
votes
1 answer
How to check if button is clicked in LoadViewState?
I want to check if button is clicked in LoadViewState
Code:
protected override void LoadViewState(object savedState)
{
base.LoadViewState(savedState);
//Here If (btnAddExperience_Click() is clicked)
{
method1();
}…

user2500094
- 1,033
- 6
- 23
- 42