I'm trudging through ASP.NET. First some blunt honesty... if I had a choice I'd never to another web project... I just find applications more enjoyable, maybe because they're simpler to me, regardless though, I'm in it know and have to make the best of it.
Here's the start of the page I'm doing for my in-laws church:
http://www.autumnhaze.org/salem
Notice that it looks like crap. The buttons on the left are a user control...crappy as it may be. The events page has a data list and if you were to log in you'd have the add, edit, and delete functionality. I followed an Example from an MS book on the logging in. I put a group of allowed users in the web.config file. A database holds valid user names, passwords, and groups they belong too. In the global class in the procedure that checks the security context...can't remember the name of the event right now I pull information and reset them to be a part of whatever group they are a part of... Microsoft in their example has you at the Application_OnStart event set up a application object that will hold that information... this is were I though you would use a Session object and a Session event... but Session is not available from the global class... why is this? I would think that an application object, by it's name, would be global to all running instances on the server and therefore if I log in, anybody else who is using that application at the time would then become logged in. Secondly, is this the best way to keep people from doing events they should be? (I keep the add, edit, and delete portions missing by using the User.IsMember(group_name) function or whatever it is, and I use that same thing before any adding, editing, or deleting to make sure they didn't back door via the URL to that method.
Next thing...you know when you hit Refresh and a page will say 'data has expired do you want to re-submit?' or whatever it is, how would you check to make sure that isn't the case in ASP.NET so that somebody doesn't hit refresh and the same data doesn't get posted twice.
Also I'm using a dataset... I find this a tremendous waste of server resources, especially doing as microsoft says and saving it in a session object between posts... how do I bind a data reader to a data list through code? (I've used the wizards up to this point that generate an xsd file). I don't like using wizards, I rather code things myself, and I would think reading what I need to read and being done would be easier on the server than initializing a dataset, creating a table, creating a data adaper, then calling the update method, then iterating through all the rows to bind the information... opinions on that are welcome.
Finally, if you've done app programming primarily in the past (and could whip out (complicated) programs without blinking twice) and were thrown into ASP.NET and are finding the transition a lot more difficult that it should be (I mean it's fairly limited in comparission and therefore should be a snap), let me know what you did to make things come together. I just shake my head at myself that I'm having all these issues with something so simple and yet I've done some rather complicated applications in the past that seem easy in comparission.
One last thing... page validation... is there something in between on and off. Like if I leave it on and a put a less than or greater than sign you get an asp error before your code even starts. If I leave it off I have no validation what so ever unless I build it... understandable... but on somethings (like new fields) I want it off, but on others I want it on... why isn't there a Page_OnValidate method that if you use overrides the default ASP.NET validation, or is there and I just don't know about it? I mean, I've used special symbos here <> and this page doesn't crash, yet they probably don't have a function checking every possible syntax error that crashes the server running on every object on the page. ASP.NET is so frustrating to me...
Here's the start of the page I'm doing for my in-laws church:
http://www.autumnhaze.org/salem
Notice that it looks like crap. The buttons on the left are a user control...crappy as it may be. The events page has a data list and if you were to log in you'd have the add, edit, and delete functionality. I followed an Example from an MS book on the logging in. I put a group of allowed users in the web.config file. A database holds valid user names, passwords, and groups they belong too. In the global class in the procedure that checks the security context...can't remember the name of the event right now I pull information and reset them to be a part of whatever group they are a part of... Microsoft in their example has you at the Application_OnStart event set up a application object that will hold that information... this is were I though you would use a Session object and a Session event... but Session is not available from the global class... why is this? I would think that an application object, by it's name, would be global to all running instances on the server and therefore if I log in, anybody else who is using that application at the time would then become logged in. Secondly, is this the best way to keep people from doing events they should be? (I keep the add, edit, and delete portions missing by using the User.IsMember(group_name) function or whatever it is, and I use that same thing before any adding, editing, or deleting to make sure they didn't back door via the URL to that method.
Next thing...you know when you hit Refresh and a page will say 'data has expired do you want to re-submit?' or whatever it is, how would you check to make sure that isn't the case in ASP.NET so that somebody doesn't hit refresh and the same data doesn't get posted twice.
Also I'm using a dataset... I find this a tremendous waste of server resources, especially doing as microsoft says and saving it in a session object between posts... how do I bind a data reader to a data list through code? (I've used the wizards up to this point that generate an xsd file). I don't like using wizards, I rather code things myself, and I would think reading what I need to read and being done would be easier on the server than initializing a dataset, creating a table, creating a data adaper, then calling the update method, then iterating through all the rows to bind the information... opinions on that are welcome.
Finally, if you've done app programming primarily in the past (and could whip out (complicated) programs without blinking twice) and were thrown into ASP.NET and are finding the transition a lot more difficult that it should be (I mean it's fairly limited in comparission and therefore should be a snap), let me know what you did to make things come together. I just shake my head at myself that I'm having all these issues with something so simple and yet I've done some rather complicated applications in the past that seem easy in comparission.
One last thing... page validation... is there something in between on and off. Like if I leave it on and a put a less than or greater than sign you get an asp error before your code even starts. If I leave it off I have no validation what so ever unless I build it... understandable... but on somethings (like new fields) I want it off, but on others I want it on... why isn't there a Page_OnValidate method that if you use overrides the default ASP.NET validation, or is there and I just don't know about it? I mean, I've used special symbos here <> and this page doesn't crash, yet they probably don't have a function checking every possible syntax error that crashes the server running on every object on the page. ASP.NET is so frustrating to me...
Last edited: