ViewState Alternatives In Web Forms

Sep 17, 2010

Are there any other ViewState alternatives? I've heard a lot Like Session, holding the state of some of the page's controls' state and getting destroyed the moment the user leaves the page. I know I'm describing ViewState itself, but I'm looking for a pattern of sorts or suggestions so I can avoid ViewState altogether. An example of how I'm using it is where I'm storing the contents of my grid (A list of ViewModels) to ViewState. This helps to know which entries are dirty, which ones have been modified, their indexes, the currently selected objects, etc.

View 4 Replies


Similar Messages:

Alternatives For Forms Authentication Methods?

Jun 7, 2010

We are developing a web app that will have a pretty complex user and permission system. The general idea is that we have 3 levels of security:

a simple user - that can only access basic data that is in a data repository
a manager - that can open up data repositories
a superuser - that can open up repository factories.

Each repository contains various data types(text, images, etc etc). We are looking for authentication methods that will allow us:
1. Scalability.
2. Customization.
3. To create permissions that will effect the GUI + deny access to certain pages.
4. To create predefined roles - that will allow for easy setup of new users.
5. To create custom roles for specific users - allowing them permission sets that are different from the predefined roles.

View 4 Replies

Web Forms :: Alternatives To Table Control

Mar 17, 2010

Currently, I'm using a Table control and manually retrieve data from the database and then dynamically create the Table to display the data. However, I find Table control hard to format/style. GridView looks easier because we have a skin created for gridview which will give a uniform look. But the problem is GridView is designed to work with Data components instead of manually data retrieval.

View 1 Replies

State Management :: Failed To Load Viewstate. The Control Tree Into Which Viewstate Is Being Loaded Must Match ?

Oct 9, 2010

Now here is the weird thing. First i am running it locally on the built in vs2008 web server.I load my control in fine, do a postback from a linkbutton, locally on my machine it all works fine, no issue.However when it goes onto my host, it falls over with the message:

Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.Now i also load controls dynamically and use postbacks and things in the admin area of the site...and that works fine, however my front end just keeps failing? See the code behing below:

[Code]....

View 1 Replies

State Management :: ViewState And ObjectDataSource / Getting Values From Viewstate In GetTopThemes?

Jan 11, 2011

I have problem getting values from viewstate in GetTopThemes.

<asp:ObjectDataSource
ID="sourceGetTopThemes"
runat="server"
TypeName="DBConnection"
SelectMethod="GetTopThemes"
EnableViewState="true"></asp:ObjectDataSource>

[Code]....

}

[Code]....

when the page is not Posted back, I saved all values in the viewstate.

View 2 Replies

State Management :: ViewState - Does The Master Page Have Its Viewstate

Apr 30, 2010

I have been getting this error a lot lately with some of my users, and I had a couple of concerns with view state and I have read so many articles but I am still lost..

1. I use masterpage on all the pages and I need viewstate for some of the pages but..

There is a page where a user will fill out the information and then submit this data to a cgi server, and it is where I get most of the Client Disconnected errors, what would happen if I disable viewstate when they click on that button?

Now when a user browses from one page to another, does the view state from the previous page get deleted? If not how would I delete it?

Does the master page have its own viewstate? Would I be able to make sure none of items on my master page are using the viewstate?

View 7 Replies

C# - Page With ViewState Disabled Still Be Validating A Viewstate Field?

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

MVC :: Are There Any Validation Alternatives

Aug 4, 2010

Im looking for some input on a validation problem i have. My demands for validation are:

1. Able to do database checks

2. Error messages are custom and imported from other localized source as stringvariables(NOT resource files).

3. DRY serverside and clientside validation.

As far as ive seen data annotations dont work well under these cirumstances, custom attributes are needed just to be able to output the strings(wonder why this wasnt thought of). This isnt a dealbreaker but as ive tested sofar custom attributes must be added in the global.asax wich i 1. cannot get to work in the CMS im building this on and 2. i dont want to have to edit the global.asax everytime the scripts are implemented. Serverside this solution works fine though. From what ive read IDataErrorInfo should not be used? So havent really checked how to get this rolling with client-side either.

My thought was using custom service layer validation with xval but documentation is very poor to the extent i could find any(couldnt find any real nfo on how to implement xval with your own code, ie not using the autgened client-side metadata wich leads to the annotation problem described above). So i have a hard time finding any working solution other than to build something 100% custom.

Do anyone have a solution or perhaps some information or can steer me in any direction on the best way to getting this done in a good fashion other than building custom?

View 4 Replies

C# - Some Alternatives To Resharper?

May 14, 2010

I'm considering purchasing a resharper license but would like to know if there are any possible alternatives to resharper and how would you rate these compared to reharper? It doesn't necessarily have to be a free alternative but I would just like to know how good equivalent products are.

View 8 Replies

.NET Alternatives To UDP Multicast?

Jan 8, 2010

I am looking for an alternative to using UDP multicast on the .NET Framework and am looking for suggestions.I need to send messages to several web servers running quite a few ASP.NET applications. These messages would be one-way only, coming from several different machines. UDP multicast would be perfect except that I can't use it due to it requiring administrative rights. Seehttp://stackoverflow.com/questions/1941463/asp-net-multicast-udpclient-problems for details as to why.Is there something else that would work in a similar manner, allowing multiple applications to receive broadcast-type messages?

View 4 Replies

C# - How To Stay Away From DataSets, And What Are The Alternatives

Jan 25, 2010

I found an interesting discussion here:

[URL]

Quote:

DataSets are sub-par amateur solutions to code your Data layer...Stop Using Them and learn to CODE! :)

What is your opinion of DataSets vs. just stubbing out custom classes and working with those? What are other alternatives?

View 3 Replies

Looking For Aspose Slides Alternatives

Sep 23, 2010

I'm developing an ASP.NET website that will allow users to view and print Microsoft PowerPoint slides. Right away, I knew that Aspose had a product that would likely allow me to do this. What I'd like to do is look at alternatives just to say to management, "Yes, I've looked at the alternatives and they are". I can't seem to find any other than the open source project on Source Forge which seems to be mostly dead and I'm not even sure if it's something that would meet my needs anyway: [URL]. Is anyone aware of any alternatives to Aspose Slides .NET? Please list them if so. If you are aware there are no decent alternatives, I would find that information useful as well.

View 2 Replies

Alternatives Of Datatable With Different Parameters

Apr 5, 2010

In my web application, I have a dynamic query that returns huge data to datatable and this query is often recalled with different parameters. So database is exhausted. I want to get all record with no parameters to an object, and perform queries (may be with linq) on this object. So database will not be exhausted. Which objects can be used instead of datatable?

View 1 Replies

Alternatives To MS Chart Control?

Jun 16, 2010

We're using the MS Chart for .net, but encountering the "image not found" problem for which there doesn't seem to be a solution. Are there any alternatives for generating simple charts?

View 4 Replies

SQL Server :: Storing PDF Into SQL Or Alternatives?

Dec 10, 2010

title isn't as detailed as I hoped but I have a few questions. Traditionally I've always been a mixed mode person, storing PDFs and other things into the file system with pointers from my SQL DB to them.

Recently I've heard more people storing files into the DB directly and wonder if I'm storing files around 100-200MB in size, will I run into a lot of issues? Are there ways to compress the files other than perhaps zipping them up and storing the zip?

Finally, something I've always wondered about but never really found a good work around for... if I decided to continue with the mixed-mode storage solution, and these I need to retrieve these files for use on a website, how do I secure these files so that someone can't just randomly come and retrieve these files off the server by guessing files names, etc?

I did one work around once where I stored a set of PDFs to a non-web directory like c:pdf and setting permissions for the web account to access them. This allowed me to retrieve them using the references in the DB and provide some garbled filename so people couldn't retrieve it themselves but this all seems rather complicated.

View 1 Replies

Alternatives To Error Provider?

Jan 11, 2010

recommend any alternatives to the error provider? What are their advantages?

View 1 Replies

Alternatives To Web.config Files

Jun 6, 2010

In my experience, web.config files are widely reviled. In particular, I have found them difficult to manage when you have multiple environments to support, and fiddly to update due to the lack of validation at update-time and the verbosity of XML.

View 2 Replies

BlockUI Alternatives For IE9 Beta?

Nov 1, 2010

BlockUI is throwing some exception when using its demos on IE9 beta.Meanwhile, does anyone know a similar feature in jQuery for showing a "Please wait" message when ASP.NET AJAX is processing?

View 1 Replies

WCF / ASMX :: Alternatives To Returning A DataTable From WCF

Dec 7, 2010

I have read a lot of posts describing why it isn't good practice to return heavy objects like DataTable/DataSet to the client from WCF. However, there doesn't seem to be much discussion about the alternatives (or maybe I'm not looking in the right forums).

My problem is this: I've tried to convert my DataReader/DataTable into a List<List<string>>, where List<string> represents the data in each row, but get an error at the point when the data is being sent to the client. A simple List<T> or a one-dimensional array gets returned without any problems. But whenever I try to return a collection of collections, there seems to be an issue. I don't know until runtime what my DataReader would look like as different stored procs are called based on user selection from a web form.

What am I missing here. Is WCF not able to handle collection of collections (I know that multi-dimensional arrays are not supported)?

View 1 Replies

SQL Server :: Any Alternatives Of Using Transaction Scope

Jan 24, 2011

I have a multiple database operation, Have three tables (MSsql) and need to delete one row in each table in one operation, one after another. (Three functions, three rows of code). Everything is working as it should be, recently I was advised to use a transaction scope, which should guarantee the safety of deletion from all 3 tables together.
Here is my new code:
[Code]....

Locally all worked just fine, the transaction scope worked well, but when I have uploaded my application to my hosting server, I got an error of: The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025).I talked with the host support, they tried to do something, then I got this error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

After a 2 days, They have contacted me, they said it is not possible to disable some restriction, that will allow an access to this operation, because I'm using shared hosting, and I need to upgrade my plan to VPS. VPS is a very expensive for me, and I can't afford it, What I'm looking is a some similar way of doing the same operation as transaction scope do, that may work at my hosting, At least I would like to try something else. Is there any additional way for the transaction scope?

View 1 Replies

Alternatives For Server-side PDF Viewing?

Jun 22, 2010

I'm looking at options for rendering PDFs on the server to avoid the user having to download them (they're big docs) and/or have a PDF reader installed and configured (audience is not tech savvy). The Google Viewer and Scribd are nice examples, but I'm not interested in making the PDFs available on the web (for Google) or storing them on another party's servers (Scribd).

My favorites right now are FlexPaper and PDFWebViewer.NET but I wanted to see if I'm missing any other options. Most of the related SO questions on this topic are somewhat dated, so maybe there's something new?

Any other options to check out?

View 7 Replies

Alternatives To HtmlTextWriter In A System.Web.UI.Control?

Mar 10, 2010

Can you use FluentHTML or other alternatives in an web application user control?

Can you put a markup file in a System.Web.UI.Control like the System.Web.UI.UserControl but without the burden of the Page object?

I would like to reduce the number of lines of the following code:

[code]....

View 2 Replies

State Management :: Alternatives To Sessions?

Nov 2, 2010

i have a situation where worker process recycling is causing session to expire and loose all the session data. Change to State Server and SQL server seems to be very complicated and impossible beacuse we use third party objects which are non-serializable. We need to let users keep running our ship tracking website for weeks or months beacuse they use it in their lobby and they do not want to touch it again. What alternatives i have if worker process recycles which causes to loose session data. I will need to atleast retain their user id and password to autologin them incase session expires.

View 5 Replies

Are Health Monitoring And ELMAH Alternatives Of Each Other

Feb 21, 2010

I was going to use ELMAH for our ultimate automatic error logging but recently realized that ASP.NET Health Monitoring does a same work (perhaps). Now I want to know (please) if they are alternatives of each other just like log4net and entlib?

View 3 Replies

C# - DAL And BLL Naming Conventions Other Peoples Alternatives?

Jul 12, 2010

peoples naming conventions for DAL and BLL if there were any better names for them than those ones.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved