Jump to content
Xtreme .Net Talk

bitburner

Members
  • Posts

    6
  • Joined

  • Last visited

About bitburner

  • Birthday 10/07/1974

Personal Information

  • Occupation
    Software Developer
  • Visual Studio .NET Version
    Visual Studio .NET 2003
  • .NET Preferred Language
    C# and VB.NET

bitburner's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am trying to include a style object in a child control using an object that inherits from the following class System.Web.UI.WebControls.TableItemStyle. The reason for this is to provide my child control with a composite property to hold the forecolor,backcolor,font,etc.... I have been losing the battle here folks, the problem is that I lose the settings every time I start the application, the TypeConverter class would be a candidate to fix this if it were only a few subproperties to do conversion code for but I need something with a little more snap. What I want is to have the styles to be represented as child tags within my parent control tag (like the Header and Row Style tags in the datagrid etc...) I am guessing that I may need to use some kind of container for my child control inheriting from ITemplate but I am not sure if I am going down the right path. Anyone have some insight as to what I should be doing to make this work properly? Thanks!
  2. No I don't think so. Slow compared to what? And what part of it is slow? All of it or just the part when you are loading data from a select query? If that is the case then I would recommend checking your select Query's performance. I have seen other data access tools work faster, but the dataset offers lot's of nice features that make it worth using (not to mention it hooks right into the rest of the managed code in .NET). If you are considering going back to disconnected recordsets in ADO 2.6 or 2.7 keep one thing in mind, that using an interop wrapper for this will not only hurt the performance of your application, it may even make it worse because your calls now have to pass through a Runtime Callable Wrapper (RCW). In order to make method calls to a COM interface. This is not a good solution by any means.
  3. First you need to make sure that the auto post back property is set to true on any drop down that you want to fire events on the server side (during a post back). After that is done... If that is an exact copy of the code snippet that you posted the reason that the selected item change event is not getting handled is that you have not "tied" this method to the event delegate. You need to place a Handles statement after your event handler function like this... protected Sub myDropDown_SelChange(byval sender as Object,byval e as EventArgs) Handles <name of control>.<event delegate> End Sub In your situation if the control that is fireing the event is in fact called myDDL then it will look like this... Public Sub myDDL_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles myDDL.SelectedIndexChanged after you add the handles statement it will tie this function to the event delegate of the drop down list. As far as having a single function handle the selected index changed event of multiple drop downs, this is done by creating a chain of items that all fire the same event like this... Protected mySelectedChangedHandler(byval sender as object,byval e as System.EventArgs) Handles ddlOne.SelectedIndexChanged,ddlTwo.SelectedIndexChanged,ddlThree.SelectedIndexChanged Keep in mind that the event delegate that you need to link to this event handler MUST have the same function prototype as the event handler itself (example - you couldn't link a datagrid page changed event to this becase the second parameter of that control is an object of DataGridPageChangedEventArgs and not just EventArgs. Cheers!
  4. I have also recommend the ASP.NET Core Reference book from Microsoft Press. This book as an outstanding chapter on implementing security. Dino Esposito (the author) is pretty good a breaking it down into bite size chunks so I highly recommend it. If you are looking for a book to transition you from VB6 to VB.NET then check out the book (Upgrading from VB to VB.NET) this is another Microsoft Press book. This book is what I used when I started learning .NET and I recommend it for anyone with a Visual Basic background who want's to jump into .NET development.
  5. There is no "selected" property in a drop down list (I double checked to make sure). Are you refering to the "selected" property "SelectedItem" property? When you select an item in a drop down list, it holds a reference to the selected item with the lowest index in the .SelectedItem property. If no items in the list are selected then the selectedItem property will be a null reference. You need to inspect the selecteditem reference before using it to ensure that it is acutally pointing to an item in the drop down list (in other words that you actually have an item in the drop down list selected). You do this as follows If(Not ddlMyControl.SelectedItem Is Nothing)Then 'code here to work with the selected item... End if Keep in mind that if the selecteditem returns a listitem that logically that listitem's selected property will also return true. If you are working with multiple selected items you need to get to them another way. Here is a snippet on how to do it. Dim li as ListItem For Each li in ddlMyList.Items If(li.Selected)Then 'code here to work with the selected item... End If Next li Hope that helps!
  6. I have used the Dataset in both 1.0 and 1.1 and can tell no difference in performance.
×
×
  • Create New...