[ADVANCED-DOTNET] Determining what spawned a postback in a datagrid
Here is the deal. I have a datagrid. In this datagrid I am updating (ok|cancel) and deleting recorords. I got the wonderful idea to allow users to filter them since there are so many. The filter logically calls for a dropdownlist. The DDL has a autopost set to true. Then the DDL only binds on the first load and there is a seperate method to bind the DataGrid. The issue is there is a databind() method that is called that appears to 'wipeclean' the values in my textbox objects using the original values and NOT what I have typed in. This event is what fires off and makes my "ok | cancel" linkbuttons appear. My Page_Load method looks like the following: If Not Page.IsPostBack Then DDLFilter.DataBind() BindData() else BindData() end if The issue is in the 'else' condition's BindData() call. Commenting out the BindData() however allows my update statements to function as desired, my filter routine doesn't work at all. So I tried to do the following: If Not Page.IsPostBack Then DDLFilter.DataBind() BindData() else if e.GetType.GetProperty("commandname") <> "Update" Then BindData() end if end if This throws an exception. Since I'm not good at reflection I did some research into the topic and got totally lost. How can I pull the command name for the button that has been clicked? The reason I know its there is because when I did a: Response.Write(e.GetType.GetProperty("commandname")) "Update" returned in the browser for those situations where I have clicked the button previously. Of course this still may not address my binding issue! *cry* If anyone has any filtering suggestions that would get along with my editing I have going on, I would love to hear them! thanks a heap! Courtney = Courtney Smith [EMAIL PROTECTED] === This list is hosted by DevelopMentorĀ® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
[ADVANCED-DOTNET] windows service memory footprint
Thanks to everyone for the replies. I've done everything short of calling the garbage collector which has been suggested against both in print and verbally. As for the SQL solution Russ suggest below, I think my collection of SQL stored procs that gets called to create my reports its more complicated than my SQL abilities to create on my own into one massive stored procI also need to make these into html emails, nicely formatted...something System.web.mail does very nicely for me to send out to from anywhere between 0 - 300 people per day. This isn't spam by any means. Its internal to our organization. :) It appears the memory usage depends on the quantity of the emails sent out that day but I'm destorying (setting to nothing) all of the DataSets and DataReaders used. As mentioned in a pervious post, it likes 7MB just to exists as a service in the Service Manager running a 24 hour timer. Courtney Date:Wed, 30 Jul 2003 09:37:38 -0700 From:Russell McClure <[EMAIL PROTECTED]> Subject: Re: windows service memory footprint Courtney, Just a thought (I'm assuming you are using SQL Server): you could actually leverage the SQL Server Agent to do what you describe. That way you wouldn't even need your own service. All you would need to do is to create a Job under the SQL Server Agent and specify the times that you want it to launch. Then add steps to the job that call the stored procedures and send emails etc. This would all be written in T-SQL. Anyway, if this sounds interesting, let me know and I can give you more detail if you want. Russ = Courtney Smith [EMAIL PROTECTED]
[ADVANCED-DOTNET] windows service memory footprint
Hello, I'm taking a stab at windows services for the first time. My windows service is written in vb.net (not my lang of choice but I have to go with the flow of the department). It is running a once a day timer that calls several stored procs and depending on the size of the returned values(s) sends out emails. Now for my questions. Can I expect Windows Services in .Net to have a considerable memory foot print? I check and rechecked the closure of my only dataset and datareader objects. I have also set them to nothing when I have finished using them. This service is only called once a day. When it first started it uses a woping 7MB of RAM...then on first execution it uses 18MB and this stays constant execution after execution. I monitored the size hoping the garbage collector might help me out but to noavail. I do not implement IDispose if that helps. thanks in advance for any advice! Courtney = Courtney Smith [EMAIL PROTECTED]
[ADVANCED-DOTNET] Error Entering Debug Mode in VS.net
Perhaps someone here has encountered this error before. I'm not sure if somewhere over the past few days I have managed to jackup my project file and keep it from entering debug mode. When I try, the following dialog box appears. I have placed a screen shot to describe it since I can't do it justice typing it out. http://www.gingy.net/images/DebugError.JPG I followed the instructions and as it turns out my settings were already set as perscribed to fix this problem and noting had changed (from what I could tell). I have also included a screenshot of my settings from this page: http://www.gingy.net/images/DebugError2.JPG After hitting the 'ok' button it simply completes its built (error and warning free) but doesn't attach nor start the debug process. I do have a valid page in the root of the project tagged as a start page and it has a stop in it, if that helps. As many of you know, its nearly impossible to develop an asp.net app unless you can enter debug mode! :) Any help would be greatly appreciated! :D thanks, Courtney = Courtney Smith [EMAIL PROTECTED] mobile:770-380-5633 You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
[ADVANCED-DOTNET] Access Denied Error in Machine.Config
Hello, I have received a strange error that occurs at random times that I just can't seem to figure out. Perhaps someone here as encountered this same error. http://www.gingy.net/images/accessDenied_Error.JPG I have created several class libraries in my project. They are all appropriately referenced in another project. About 95% of the time the prototype hums along just fine but at certain times I will get the following server error: Description: An Error occured during the processing of a configuration file required to service this request. Please review the specific detail below and modify the the configuration file appropriately Parser Error: Access is Denied: Crown.WebModules.Accounts.Configuration Source Error: line 197: line 200: Source File: C:\windows\microsoft.net\framework\v1.03705\config\machine.config line: 199 I can tell my this its having an issue with my machine.config file, but not exact what it is. Is it that fact that the library needs to be referenced here? If so, how? How come it works fine 95% of time if so? I also do not even need to be instantiating the library or any of its classes for this error to occur. It just needs to exist in my /bin directory. Removing it alleviates the issue but not having libraries is a problem! :) I can also wait a 2 or three 3 minutes and refresh the page and all is well! :O Quite strange to me. I'm not doing a recompile, I'm not saving the project, I'm not even changing my windows wallpaper! Honest! My pages just simply start working again and I sluff off the problem to my task list. I've also experienced this issue in other projects as well with third party libraries that were made as .net class libraries. I've searched knowlegebase after knowledge base on this one, forum after forum and have yet to figure out what could be creating this random error. Any leads, suggestions or ideas would be a great help! :D thanks a heap, Courtney = Courtney Smith [EMAIL PROTECTED] mobile:770-380-5633 You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.