AJAX :: NoBot Fails When ViewState Is Disabled?
Feb 24, 2010
I tried this in many scenarios and everytime the ViewState is disabled page-wide, NoBot raises an internal NullReferenceException and always returns InvalidBadSession. I suspect that you are referencing the ViewState and it returns a null value which is then used. It's probably a good idea to think about a way that avoids using ViewState.
View 1 Replies
Similar Messages:
Sep 24, 2010
I have a shopping cart page (Cart.aspx) that has a button that will (sometimes) post to a third party payment gateway, if payment is necessary. The payment gateway will process the payment and then do a silent post to my website (Order.aspx) so I can update the order status.
Order.aspx always throws an invalid viewstate error, even though viewstate is disabled on the page.
What's happening is that Cart.aspx (which has viewstate enabled) posts to the payment gateway, and the gateway will post it back as part of the silent post. Even though Order.aspx has viewstate disabled and validation disabled, it still tries to validate the __viewstate field it's being given.
I know setting EnableViewState=false will disable the rendering of the __viewstate field, but if another page provides the field, shouldn't it still skip validation? I tried calling ViewState.Clear() on the Page_Init event of Order.aspx, but ViewState is apparently empty. how to get around this? I don't want to disable ViewState on Cart.aspx (in some cases it may be necessary), but I can't figure out how to clear it on Order.aspx.
View 1 Replies
Aug 9, 2010
how to use Ajax Nobot control in Asp.net MVC.
View 1 Replies
Feb 24, 2010
I have a couple of textboxes (actually a set of pairs of textboxes) where users can either enter a value or a percentage of a value but cannot use both. So in any given time some of these textboxes are disabled depending on which option the user chose.
For the textboxes representing percentages, there is a range validator to make sure only values from 0 to 100 are entered. If user selectes to enter datanot in percentage form, the percentage textbox gets filled automatically based on the value user enters. So if the total is something like 8 and user enters 2, the corresponding percentage textbox gets filled with 25% (minus the % sign).
However, the vaidation fails as if there is nothing there, persumably because the textbox is disabled. How do I get around this?
[code]...
View 2 Replies
Apr 29, 2010
I have a repeater which viewstate is disabled, inside i have a textbox and a submit button. Before disabling viewstate i could get the text from the textbox in the submit buttons onClick event. But now it doesnt seem to work.
I dont want to enable viewstate on the repeater as my site get really heavy then. How can I get the value form the textbox when I click the submit button? using .net 3.5
View 1 Replies
May 14, 2010
I have a ASP.NET 4.0 webforms site where I have the MasterPage so it is set to ViewStateMode="Disabled" along with the content placeholders being set similarly.
When I'd view my page I'd still see a ViewState field rendered, I then tried adding the ViewStateMode="Disabled" to the page level also but that didn't change anything.
View 1 Replies
Mar 19, 2011
I want to disable my viewstate in a form because its too bulky (about 1mb per page) due to retrieving some data from database and in other place on the same form I want to access a control from my master page. but when I set viewstate of Listview to false I'll get following error: Object reference not set to an instance of an object. what should I do in this situation? veiwstate is too damn bulky
and here is what I've written for accessing particular control:
Control cc = Page.Master.FindControl("mainContent").FindControl("ListView1").FindControl("itemPlaceholderContainer");
foreach (Control ListItemctrl in cc.Controls)
{
Control lblNewsId = ListItemctrl.FindControl("lblNewsID");
if (lblNewsId != null)
{
Type t = lblNewsId.GetType();
if (t.FullName == "System.Web.UI.WebControls.Label")
{
string newsID = ((Label)lblNewsId).Text;
foreach (Control childCtrl in ListItemctrl.Controls)
{
CheckBox ctrlCB = childCtrl.FindControl("chkItem") as CheckBox;
if (ctrlCB.Checked)
{
//based on DDLAction we will do the things ;)
}
if (childCtrl.FindControl("chkItem") != null)
break;
}//end foreach childCtrl
}
}//end outer if
}//end foreach listItenctrl
View 1 Replies
Oct 18, 2010
I am having an issue with dropdown list when viewstate is disabled. The selectedindexchanged event fires even for the other events on the page.
I am pasting the code bello. To reproduce the issues I am mentioning change the selected value of the dropdownlist and then click any button the selected indexchanged event fires even thought we didnot change the value.
[Code]....
View 1 Replies
Apr 27, 2010
I have a CheckboxList that seems to load and do everything right, except for when I do a postback, it will not have the Item.Selected property set. I have viewstate disabled for the entire page.
I load it like so(inside Page_Load on every load):
foreach (DataRow service in d.Tables[0].Rows)
{ [code]...
and MyLabel never has any text added to it. I can verify with the debugger that it does reach the _Click's foreach loop, but no item is ever selected. What could be the cause of this?
View 1 Replies
Feb 5, 2010
The following message appears in our log:The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. alot has been written about this subject. However, I cannot reproduce this behavior, and I only find a couple thousand errors per day in the logs; so it's probably isn't that obvious.
The page in question has an UpdatePanel and loads one of three usercontrols depending on the querystring.Is there any known issue with some clients, or any other possible explanation?
View 2 Replies
Oct 23, 2010
When we disabled the viewstate in gridview its lose value but this case not true with Textbox control why?
View 1 Replies
Jul 16, 2010
After witnessing some strange behvior I'm confused about ViewState again :/
My understanding was a textbox needed to have "EnableViewState" set to true otherwise when the you postback the fields contents would disappear.
That's not happening, I created a textbox and button and a label.
The button was set to copy contents of text box into the label when I pressed it.
I did and the text was populated into the label and remained in the textbox?
This was inside an UpdatePanel and the page itself has a MasterPage, so that might have something to do with it, but I have about 50 textboxes on this page all with viewstate=true on, so I would really like to know what controls need to have enableViewstate=true in order o function properly.
View 1 Replies
Jan 31, 2011
If I disable the ViewState on a ListView, the events raised by it are no longer ired. OnPagePropertiesChanging is the ListView event I've always used in combination with the DataPager to update the ListView to the correct page once a DataPager item is clicked, but since its not being fired, I'm wondering if there are any other options. My ListView is currently in an UpdatePanel, and I'm caching the results that the ListView is being bound to. I could rebind the cached results on the PageLoad, but I can't think of a good way to determine if the PageLoad is being accessed because the DataPager was clicked, or for some other reason, so this doesn't seem like a good idea
View 2 Replies
Nov 12, 2010
I am using a GridView with an ObjectDataSource bound to a DataTable. I am using the GridView for displaying a report, NO editing is being done, just read only, however, I am sorting and paging. I need to turn off ViewState for the GridView to improve performance. After turning off the ViewState I start getting the error messages for both paging and sorting:The GridView 'gridView' fired event Sorting which wasn't handled.This is fine I just need to know how to implement the Sorting and Paging events correctly to leveage the ObjectDataSource. I would preffer not to remove the ObjectDataSource from use, especially if there is a way I can manually wire up the datasource correctly to continue to use the GridView as I had been when ViewState was on.Any help on getting the datasource wired up or a solution for handling the events in the context of the datasource would be great.
View 1 Replies
Oct 6, 2010
To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.
As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.
I pasted in the code using the text only option becuase the format was getting messed up. I probably need more background on why the fields are blanking out.
[code]....
View 8 Replies
Sep 16, 2010
I installed VS 08. and then installed Ajax extensions 1.0. I also downloaded ajax control toolkit and added to my toolbox. And I placed scriptmanager on the designer. Now when I am trying to add functionality to standard button via smart tag option. I see this option disabled. how can I enable it and have extenders in play.
View 2 Replies
Jan 9, 2010
I am just about out of my mind on this due to spending way to much time trying to find an answer with no results. I am using vwd2008. The website is in 2.0 due to the hosting company not supporting 3.5 yet. I was using the ajax toolkit without any issues. Now all of a sudden the script manager is greyed out as are the tools. If I open a new site they are enabled. It's only on the two sites I have built in 2.0.
I went back to vwd2005 for this web and here the tools are visible and enabled but scriptmanager is greyed out. I tried tricking the site by building a page in a new web in vwd2008 and importing in the pages but when I try to load them I get an error related to scriptmanager. I've read many posts related to wireless devices causing issues but I have none attached. I've uninstalled and reinstalled both applications but nothing changes. I updated my web.config file to contain the following code:
</pages>namespaces>clear/>add
namespace="System"/>add
namespace="System.Collections"/>add
namespace="System.Collections.Specialized"/>add
namespace="System.Configuration"/>add
namespace="System.Text"/>add
namespace="System.Text.RegularExpressions"/>add
namespace="System.Web"/>add
namespace="System.Web.Caching"/>add
namespace="System.Web.SessionState"/>add
namespace="System.Web.Security"/>add
namespace="System.Web.Profile"/>add
namespace="System.Web.UI"/>add
namespace="System.Web.UI.WebControls"/>add
namespace="System.Web.UI.WebControls.WebParts"/>add
namespace="System.Web.UI.HtmlControls"/>namespaces>controls>add
tagPrefix="ajax"
namespace="System.Web.UI"
assembly="System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>add
namespace="AjaxControlToolkit"
assembly="AjaxControlToolkit"
tagPrefix="ajaxToolkit"/>controls>pages>
View 2 Replies
Jul 28, 2010
I have an accordion and a nested accordion as a menu ba on left. thepanes contain various controls mainly dropdownlists. I disable the accordion after a user has enetered some values and clicked the search button. However in IE7 the accordion is disabld and all the contained controls are too. But in IE6 the dropdownlists aren't disabled whats the reason behind this and whats the solution?
View 6 Replies
Oct 31, 2010
I just upgraded from 3.5 to 4.0 and downloaded and installed the AJAX toolkit to my toolbox. However, all the controls in the AJAX list (and other "non-standard" lists also, such as Silverlight and Form controls) are disabled.
View 1 Replies
Aug 26, 2010
I have a control which inherits from LinkButton and I'm trying to make sure that the user cannot cause mayhem by performing multiple postbacks. That seemed an easy enough challenge, so I have this code [snippet] on the client:
[Code]....
The alert is of course only there for debugging. If the DisableOnClick value is false, then I see the "Posting Back" alert and, when I click ok, the postback occurs - all good.
If the DisableOnClick value is true, then the "button" gets disabled and the cursor turns into an hourglass - again good. But the postback doesn't happen - not good. I assume that the ASP client code is trying to preventing the postback when it sees that the link is disabled.
So, how can I either:
Persuade the LinkButton to postback even though it has just been disabled; or[probably better] Get my client code to execute immediately after the postback code rather than before.
View 4 Replies
Jan 6, 2011
How to avoid Model popup disabled on postback? I have a dropdown list in model popup control with autopost back="true". On post back am getting customer name. But on post model popup get disabled
View 2 Replies
Feb 18, 2010
I am running vs2010, added the ajax toolkit. I can get form control to drag onto forms and run (ie the editor) but cannot get calender extender to work. I manually added it to the code. set the target id. No calender when ran. But the smarttag will appear on the textbox with the only option of remove extender. Why are the smart tags not working. The show smart tag option is disabled on the right click context menu of the textbox.
View 3 Replies
Jun 5, 2010
I am using VS 2010, just downloaded the Ajax Control Toolkit Binaries, have got not wireless mouse (even I tried to unplug my mouse - no success -) and I have tried deleting the .tbd files as mentioned
here; but still the Ajax control toolkit controls are grayed out and disabled!
I have tried the following also:
1. creating a new webite.
2. changing the target .NET framework from 4.0 to 3.5 and vice versa.
3. Restarting VS and Windows.
View 3 Replies
Sep 15, 2010
I have a user control (ascx) vs 2010 that contains a modalpopup extender thats popup control is an asp:panel. In that Panel I have an update panel and a contenttemplate inside the upd panel. It is a pretty simple example of its use, in that I have list box allowing the users to create a new row in a table.
However, when I click targetcontrol, the background changes to the expended modal background, but instead of being able to use the listbox, everything in the content panel is the same as the background and none of the controls on the panel are enabled. In other words, the entire page is loaded dimgray, including the updatearea.
View 6 Replies
Mar 8, 2010
I've got a bit of a problem UpdatePanelAnimationExtenders. Here's an example of the code structure I have:
[Code]....
Now here's my problem. When dd1 triggers the postback both dd1 and dd2 get disabled (instead of just dd1) and after the request is complete only dd1 gets enabled back. The behaviour is also true the other way around (if dd2 triggers the postback both dropdowns get disabled but only dd2 gets enabled back). I'm not really sure what to make of this.
View 3 Replies