Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Is it just me are ALL web platforms complete crocks? I haven't found a single one that doesn't enrage me occasionally (apart from PERL which is just so dead that it's unfunny).
I find PHP5 not too bad, but you're right - they're all a crock. Haven't touched PERL for about 5 years now, and not going back either.
I like everything else about the VS .NET 2.0 development workflow and tools but ASP just seems horrific to me. Maybe I just don't have the ASP "mindset".
You've come right out the other side of the forest of irony and ended up in the desert of wrong.
It was the same under 1.1, dynamic controls have always needed to be recreated upon each postback
Hank,
Once again, thanks for your input. You sound like you know what this ASP 2 lark is about, so I hope you don't mind if I prevail upon you further with a question.
What I want to do is really simple.
I have a webservice that returns an ArrayList of serialized objects (a SOAP call/response).
The call is made from the client, and completes as expected. An event in the client ASP app then 'foreach' loops through the webservice response object[] and instantiates and deserializes a class representing the original object from the webservice.
So far so good.
Now I need to display a row in a page (a bit like a Google hit row) with images and buttons and stuff.
I do this by dynamically adding a table row and tds containing controls for each row of the result set.
It all works very nicely, except that any event handlers I bind to controls do not fire on the page/form postback.
Do I have to move the control creation/binding into the Page Init?
Am I simply 'not getting' ASP.NET? As I said, it took me a very short time to handle this in PHP5, but ASP.NET 2 is stumping me!
Once again, thanks for your input. You sound like you know what this ASP 2 lark is about, so I hope you don't mind if I prevail upon you further with a question.
What I want to do is really simple.
I have a webservice that returns an ArrayList of serialized objects (a SOAP call/response).
The call is made from the client, and completes as expected. An event in the client ASP app then 'foreach' loops through the webservice response object[] and instantiates and deserializes a class representing the original object from the webservice.
So far so good.
Now I need to display a row in a page (a bit like a Google hit row) with images and buttons and stuff.
I do this by dynamically adding a table row and tds containing controls for each row of the result set.
It all works very nicely, except that any event handlers I bind to controls do not fire on the page/form postback.
Do I have to move the control creation/binding into the Page Init?
Am I simply 'not getting' ASP.NET? As I said, it took me a very short time to handle this in PHP5, but ASP.NET 2 is stumping me!
How would you do it?
BM
It depends what you are trying to do with the events when a user has clicked on one of these dynamically generated rows, does the event need reference to any of the data in the row if so how much (an id or all of it??)
It sounds like recreating the rows will be consuming by recreating the call to the webmethod and going through all the serialization again, so you could use the in built session or cache to temporarily store the recieved object, or a mixture of viewstate/hidden input fields, but i need to know what these postback events are doing.....
It depends what you are trying to do with the events when a user has clicked on one of these dynamically generated rows, does the event need reference to any of the data in the row if so how much (an id or all of it??)
It sounds like recreating the rows will be consuming by recreating the call to the webmethod and going through all the serialization again, so you could use the in built session or cache to temporarily store the recieved object, or a mixture of viewstate/hidden input fields, but i need to know what these postback events are doing.....
Hank, the event should just call another webmethod on the same service using a single key/id.
I'm working around this by using simple hyperlinks that pass arguments on the target URI for now - e.g. "mypage.aspx?method=this&arg=that"
That works fine, except that I need to handle the 'event' call myself in Page_Load(), and it rather seems to defeat all this ASP.NET, server control cleverness.
Surely, this is a very basic thing to do. Why are trivial, simple things so hard with ASP.NET 2?
You've come right out the other side of the forest of irony and ended up in the desert of wrong.
Here's the feature list for ASP.NET 3.0 (release 2009)
q Single-page web sites/web applications – thanks to advances in inheritance, polymorphism, code separation, unlimited partial classes, MultiView & Panel controls and more OOP trickery than you can shake a stick at, all the functionality you ever need in an entire web app will be accessible from a solitary DEFAULT.ASPX file.
q Path-less URLs – Microsoft pioneers technology that passes all view state, session state and cache data all internally and within the context of the current WebForm, eliminating the need for messy query strings, munged URLs and file extensions. All sites are now known as "http://www.mydomainname.com". Bankruptcy filings by out-of-work ad agencies anticipated.
q 100% less code to write than in ASP.NET 2.0 – programming becomes obsolete altogether. The entire ASP.NET 3.0 platform is based on single-control, declarative page assembly. Server-side logic is so indiscriminate from boilerplate HTML that devs with Ph.Ds from Stanford are being replaced by lowly marketing majors from the University of Guam (like me!)
q Intra-site search server control – the good MS folks develop a single integrated control that performs Google-like searches against a site's data store, executing a Full-Text Indexed catalog for textual content and binaries.
q Merging of dynamic imaging and personalization – revolutionary steps in intelligently detecting, tracking, storing and persisting user preferences and themes based on a personality trait profile generated by content visited by a user delivers truly dynamic, customized, random imagery on a page based on the personal likes, desires and genre-adherences of the individual. Greatly appreciated by single, heterosexual, 30-year-old males (like me!)
q Airtight security – a cool feature that detects repeated attempts at bad logins, hacks or DoS attacks upon a web app and calls an XML web service that dispatches a real-life outsourced goon squad to pummel the intruding party within an inch of their life.
q .NET Documentation – with Microsoft having successfully acquired Adobe, document compression formats are revolutionized, such that the entire .NET Documentation and MSDN Library fit on a single, standard floppy disk. (Note: by 2009, a single, standard floppy disk is 60GB, but that's not the point...)
q TrendDataSource - with the blogging and IM fads having long faded into the sunset, Microsoft creates a generic data source control that lets a developer bind apps to display data in whatever gimmicky format everyone seems to be flocking to at that moment. Completely flexible, with the intention of its usefulness being short-term.
q Auto-indexing of site content with Google – taking a progressive step forward from V2's bold initiative of auto-compilation, V3 now fully indexes your site with the major search services. Not surprisingly, you get better results with MSN Search. Since all sites now consist of one page (see above), people give up using bookmarks and Favorites lists.
q IIS becomes the new Personal Web Server – brought upon by tough competition and pressure by Apache in 2006, Microsoft releases IIS as a free web server download, to rave reviews.
q Intelligent dynamic adaptive browser rendering – we finally have real, decent, consistent looking pages across browsers and platforms. Loading an MSDN article on a T-1 connection now consistently takes 2 minutes on ANY device.
q GridViewDataGridDetailsViewDataListRepeater server control – a databound control that displays tabular data, edits, inserts, deletes, schedules, renders, e-mails, computes, sends alerts, logs, watches your kids, buys groceries and does all sorts of stuff with data.
q TivoDataSource – tight integration with HDTV and digital programming, coupled with the increasing expansion of broadband Internet access in residential communities allows for developers to use display TV programming in a BulletedList server control.
q Outlook Provider Model – now stable enough to be used within Microsoft's own confines, Exchange Server and the Outlook-based networks that consume them are integrated with ASP.NET 3.0's front-end logic. Works best with MSN, Hotmail and Passport.
q FlashDataSource – finally seceding after years of unsuccessfully being able to champion its own web animation standard, Microsoft "embraces" Macromedia and creates a cool interface with which to merge graphics and data, proving once and for all that there's a place on the Web for Flash besides movie marketing sites that only last for the 6 weeks they’re in theaters.
q SmartNavigation – for some reason, this sticks in the ASP.NET feature set. And for some reason, it's still promoted heavily. And for some reason, none of us still are able to figure it out and what the hell it does.
Comment