Jump to content
Xtreme .Net Talk

shaul_ahuva

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by shaul_ahuva

  1. Instead of manually registering the service, you can automate it in your deployment package by adding the service executable as a custom action. This will automatically register/unregister the service using the ServiceInstaller and ServiceProcessInstaller you configured.
  2. You pretty much have it, but instead of using an ObjectDataSource you can just add a data source to the report at runtime: ReportDataSource ds = new ReportDataSource(); ds.Value = Convert().Data; ReportViewer1.LocalReport.DataSources.Add(ds);
  3. Header items don't have associated data items, so you'll need to either handle the ItemDataBound event and populate the value when you're working with a header item (e.Item.ItemType = ListItemType.Header) or you'll need to call a custom method on the page to populate the vaule.
  4. Do you have the correct version of .NET installed on the server?
  5. It looks like that will work as well, though there are major problems I see from a design standpoint (display information is contained in the type definition and, more importantly, the solution relies on the internal behavior of the DataGrid).
  6. The easiest (and probably most correct) way to handle this would be to extend the DataGrid class and override the CreateColumnSet method. In your overridden method, order the ArrayList of DataGridColumn instances as desired.
  7. A common source of problems with services are security-related. What user account is the service running under?
  8. You can use System.DirectoryServices (although I'm unsure of exactly what kind of information is available). You can also use netapi, but I've never dealt with it directly so I'm not of much use :)
  9. The GridView is much better, and takes advantage of new mechanisms like ControlState and script callbacks. The names of properties and types have changed, but the GridView has an equivalent of everything that the DataGrid has - I was able to migrate a .NET 1.1 project using DataGrids to a .NET 2.0 project using GridViews with very little difficulty. I haven't seen anything stating specifically that the DataGrid will be removed from ASP.NET, but as far as I know the ASP.NET team didn't make any changes to the DataGrid because it was just not worth it.
  10. Are you looking in the wrong cell or for the wrong id? You could also try e.Item.FindControl (assuming the button's id is unique to the item). I would suggest debugging it, and seeing what the contents of the cells are.
  11. There's no "better" one, although the SqlTransaction object DOES provide you the ability to do other things within the context of a transaction (such as saving an image to the file system).
  12. I always make it a habit to explicitly call Flush() before closing the stream -- I've had too many corrupted files without doing so...
  13. What you're talking about is essentially url re-writing - take the incoming request's url, figure out where to go based on the url/querystring and do a server transfer. Here's an article on The Code Project.
  14. Yuck! :) Seriously, it's an okay library that has two critical flaws (both with WebTextEdit - the base class that most, if not all, "text" controls inherit from): 1) Anything inheriting from WebTextEdit render 2 hidden elements and an input "text" element...three times the amount of HTML that I would normally expect... 2) I have yet to find a way to add attributes to the html elements output by the server controls. The HTML elements are created on the fly (they're not "child" controls), and nothing is done (what what I can see in the source) to ensure attributes are rendered. If your pages contain a limited number of text-based controls, you should be okay. However, if your pages contain a lot (some of the pages I'm currently working on contain 100+ arranged in a grid) you could be looking at ~400K+ page sizes before viewstate if factored in.
  15. I've been searching for a way to do the following in VB.NET: for (Control c = someControl; c.Parent != null; c = c.Parent) { /* VB For loop syntax does not allow this (as far as I know). A Do While Loop could be used, but I'd rather have the variable go out of scope after the loop is done... */ } //-------------------- Control c = null; string text = (c != null) ? c.Text : ""; /* In VB.NET IIf would break if c is null since IIf is just a function call, and the result of c.Text is just a parameter... */ Does anyone know if there are equivalents in VB.NET? I don't know very much about the costs of the various operations in MSIL, but in the above scenarios the number of operations can be significantly more in VB.NET.
  16. Do you mean toolbars for IE? http://www.codeproject.com/atl/ietoolbartutorial.asp
×
×
  • Create New...