asp.net Viewstate and publishing - asp.net

I have an asp.net application where users answer question in a quiz.
After clicking on "next" a new question is loaded with an Ajax Postback.
I am using the RadAjaxPanel Telerik Control. I think it uses the UpdatePanel internally.
Will my users have (viewstate) errors if I publish a new version of the application during they are using the site?

Related

How to maintain Treeview state on postback

I am working on asp.net using C# 4.0. I am working on the treeview control where data is loaded from the sql database on click of the node. I am facing a issue when i redirect to some other page and come back i am not able to load the treeview with same data which i previously loaded before the page postback. can any one help on this. thanks in advance.

How i will invoke server control on view in asp.net mvc

I am new to mvc asp.net,I have already one application created in asp.net 4.0,
but i want to convert that exixting application to asp.net mvc architecture.
In my application every page is having some server control e.g. button, but i am not able to invoke the function associated with the button or server controls.
so, please guide me that how i will proceed so that i can convert my exixting application to mvc architecture.
ASP.NET Web Forms (including pages and server controls) rely on infrastructure provided by ASP.NET page and post-back model. On post-back, the control tree is re-build and state is restored using view-state and then control handles the post-back data to raise events.
ASP.NET MVC does not rely on post-back/view-state rather requests (GET/POST) are routed to appropriate controller actions (along with parameter mapping). The controller methods process the request and sends the response by rendering the view. View's function is just to accept the data passed by controller and generate corresponding HTML. Now ASP.NET webform (page) can be used as a view but there would be no post-back and no server control events. In ASP.NET MVC, a button click would POST appropriate form to some controller action.
You need to first understand & learn ASP.NET MVC before contemplating the migration.
Further, IMO, there is no point in migrating the application unless it has long shelf life and you foresee a frequent enhancement/maintenance requests in future.

How to raise an Event in asp.net application from a silverlight application

I have a Silverlight application hosted inside an asp.net website. In my silverlight applicaiton, if I select a theme. Then, theme changes will gets fired. I want to get notified in asp.net web page, when the theme changed event is fired inside the silverlight application.
Note: Also, I don't want to use a data base to maintain the state of the application.
You can't easily raise an asp.net application event from your Silverlight App. It should be possible, but would require your SL app to do a POST request on the server with POST parameters interfacing well with the ASP.NET plumbing. It's hacking, I would say that's not the recommended way to do it and if you do it asynchronously (without reloading the page), it could do weird things with your viewstate.
You can however call a web service from the SL app when the user change the theme. (the webservice could be something as simple as a request handler or an aspx page with get parameters or maybe a WCF service)
You could then store values about the selected theme in the user session.

Sending asynchronous request on clicking a sharepoint web part button control

I am new to this whole sharepoint and aspx programming. I have developed a sharepoint web part that has a button control. The onclick event is mapped to a method in my web part code. When I click the button the whole page reloads and the web part is rendered again. Is there a way to prevent this reloading of the page? Is there a way to call the function method in the background? Something similar to AJAX.
Thanks,
Jagannath
You can use Ajax, it just requires some sharepoint configuration. Here are a few posts to get you started:
http://weblogs.asp.net/jan/archive/2007/02/26/using-the-ajax-control-toolkit-in-sharepoint.aspx
http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3
Ajax or SilverLight are your only two options for Async operations without a page refresh.
Once you know the tricks needed to get SharePoint and ASP.NET AJAX to work together it's not that difficult.
Here are the steps required:
Ensure the ASP.NET AJAX Extensions are installed on all the front-end web servers (this is not required if you are using .NET 3.5 as the Extensions are included in the Framework)
Update the Web.config file for the SharePoint Application to support ASP.NET AJAX
Ensure any page that is going to use AJAX has a ScriptManager
Use an UpdatePanel or a client-side service call to get updated data and re-render the Web Part
This blog post has some resources from a talk I did on the subject at TechEd Barcelona 2008. These resources should give you the information you need to get started.
http://msmvps.com/blogs/windsor/archive/2008/11/13/teched-emea-resources-and-demos-integrating-asp-net-ajax-with-sharepoint-2007.aspx

ASP.NET Ajax feature in existing ASP.NET website

I have a ASP.NET Website which was developed in ASP.NET 2.0.
Now I want to add a new page to the project which will make use of the ASP.NET AJAX features like Partial page updating.
Is there any options to do this ? Do i need to change any settings for this in my already existing project /Solution ?
The only problems you may run across is inside you web.config file if you don't go in and register the asp.net ajax assemblies.
Other than that you should be able to add a scriptmanager control and work with the page like any other asp.net ajax page.
Edit: Here is some documentation that should help you configure ASP.NET AJAX to an existing website.
http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx
There is a great tutorial about how to implement AJAX on a regular ASP.NET web site.
http://www.asp.net/learn/ajax-videos/video-81.aspx
Hth...

Resources