Last post Apr 02, 2013 09:33 PM by TheNutCracker
Apr 02, 2013 08:33 PM|TheNutCracker|LINK
My head is spinning from trying to figure out where to invest my time to accomplish what I want to accomplish. And that is to simply be able to retrieve data dynamically from a web server and add it to the DOM on the client. I discovered that this was vey
easy to do using ASP.NET Callbacks by implementing ICallbackEventHandler. But soon afterwards I discovered that viewstate is not updated during callbacks and this threw me into a daze. I couldn't figure out how to properly handle this situation. And then I
stumbled across this statement (by a Microsoft programmer no less):
"All this is pretty much obsolete. Use a JSON web service and jQuery."
He was talking about Callbacks in ASP.NET(I believe). So then I start researching ASP.NET Web Services and somebody says WCF is so much better, more flexible, yada yada yada.
My simple goal is dynamic updates to the DOM on the client by retrieving chunks of data from a webserver.
If I am to follow the advice of Bertand Le Roy from above and use a web service and jQuery would that be the best place to start? Is that still good advice at this date and time? If I were to make the decision to invest time in learning WCF would it be smarter
and easier for me to make the transition if I first learned how basic ASP.NET Web Services were done? Or are they considered obsolete technology?
I have come so close to figuring out the technology to use for what I want to do which is pretty simple but as stated, because ASP.NET callbacks don't save state, it is difficult to find good solutions.
Any comments about where to invest my time in learning would be greatly appreciated. Thanks.
Apr 02, 2013 08:41 PM|thirumaran007|LINK
here is a good article, you can update DOM direclty, as my guess you dont need to use websercie or ajax , what amount of data that you are having in database,which needs to be update in your DOM ?
Apr 02, 2013 09:07 PM|TheNutCracker|LINK
Why do you say I don't need to use ajax? Of course you have to use some form of Ajax for dyanmic webpage updates.
I am not doing anything new and unusual. I simply want to populate successive DropDownList(HTMLSelectElements) on the client as each parent DDL(SELECT) is changed without having to do a postback each time. I tried doing this with ASP.NET Callback functionality
and without saving state informatino it's too difficult to do.
Apr 02, 2013 09:11 PM|thirumaran007|LINK
if you want to use Ajax you always welcome. what im saying is if your page doesn't want any post back then you can go ahead with ajax. or else you can directly make some post back event and get your data. its up to your requirement.
Apr 02, 2013 09:33 PM|TheNutCracker|LINK
My friend, it's not what I want. It's what looks the best. Postbacks get the job done but they are not as smooth. Are you reading my questions? I know how to populate DDLs on the server using Postbacks. Im trying to expand my intellectual toolset, my programming
skills, my global view of all things asp.net to understand what's available and the pros and cons of each. I already know how to use and implement ICallbackEventHandler. I explained the shortcoming of this method and I want to know what other options I have.
This is where I am. I am not at page 1 of the asp.net class.