Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. You can use XPath if the HTML is well-formed or is XHTML compliant. Well-formed examples: <link type="application/rss+xml" href="www.rss.com/rss.xml" /> <html> <head> <title>Demo title</title> </head> <body> Demo text </body> </html> <p>Text<br />More Text</p> Malformed examples: <link type=application/rss+xml href="www.rss.com/rss.xml"> <html> <head> <title>Demo title</title> </head> <body> <b><i>Demo text</b></i> </body> </html> <p>Text<br>More Text If the HTML is malformed you're out of luck when it comes to built-in framework classes.
  2. Place brackets around your table name. "User" is a reserved keyword. I believe "name" is also.
  3. Assign the value of the SQL statement in Page_Load. SqlDataSourceControl1.SelectCommand = "SELECT... WHERE [CatID] = " & Request.QueryString("id") & " ORDER BY..."
  4. Well, if you sell 90 copies at 20 bucks a pop you will have easily covered a rate of $50/hour.
  5. How many hours have gone into it? The appropriate price is the highest one that most people would be willing to pay to purchase your product, so think along those lines. What would you pay to get a copy? For something like this I wouldn't go any higher than 30 US Dollars-- something around 20 bucks would be a realistic asking price, that is if I'm picturing the component's functionality correctly.
  6. A DataSet doesn't have a connection state. It is always disconnected, as that is its nature.
  7. Form.Size.Width = 1000 or... Form.Size = New Size(1000, Form.Size.Height) Those are the correct methods of resizing.
  8. Linux and Windows are both viable environments. So are any of the BSDs and many versions of NetWare and Solaris. Pick one and use it well. There's no need to bicker over which one is better since the argument in and of itself is entirely subjective. "Love the one your with", and for God's sake stop trying to prove superiority. Bah! Do these threads never end! :rolleyes: Let's get back to .NET...
  9. Imports System.Runtime.InteropServices Imports System.Text Private Declare Ansi Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" ( _ ByVal lpRootPathName As String, _ ByVal lpVolumeNameBuffer As StringBuilder, _ ByVal nVolumeNameSize As Int32, _ [b]ByRef[/b] lpVolumeSerialNumber As Int32, _ [b]ByRef[/b] lpMaximumComponentLength As Int32, _ [b]ByRef[/b] lpFileSystemFlags As Int32, _ ByVal lpFileSystemNameBuffer As StringBuilder, _ ByVal nFileSystemNameSize As Int32) As Boolean Dim r As Boolean Dim iSerial As Int32 Dim sbVolumeName As New StringBuilder(256) Dim sbFileSystemName As New StringBuilder(256) r = GetVolumeInformation("D:\", sbVolumeName, sbVolumeName.Capacity, _ iSerial, 0, 0, sbFileSystemName, sbFileSystemName.Capacity) MessageBox.Show(r.ToString() & " " & iSerial.ToString, Application.ProductName)
  10. Change the "Long" value types in the GetWindowLong declaration to "Integer". Long's in Visual Basic .NET are 64-bit, while in Visual Basic 6 they were 32-bit. This makes a huge difference when calling a Win32 API function.
  11. The DataSet object is serializable, yes, but that wasn't his question. The custom class that he wishes to return has to be serializable, or the SOAP can't handle it.
  12. Yes, you can have multiple DataSets per connection, since they really aren't associated with any connection object per se.
  13. You declared "p" in your code... which is why I used it. :rolleyes: Change the IntPtr to an Integer, for sake of simplicity.
  14. You can only have one DataReader associated with a connection at a time. Open another connection and associate the second DataReader with it.
  15. I think that code works. Try it. *nudge*
  16. I like to think of it like this... the DataSet is Microsoft's favorite child, while the DataReader get's little reference, and remains in his room where few people will find him.
  17. Yes, but you'll need a second connection. Only one DataReader can be associated with a connection at a time.
  18. Controls belong to a Control.ControlCollection collection, which is nothing more than a strongly typed collection that, as required, implements ICollection, IEnumerable, IList and ICloneable (I believe).
  19. While I do have a plethora of information available on the topic, so does Google, so have a gander... *hint* *hint* *nudge* *nudge* ;)
  20. The window's style will have WS_MINIMIZE style applied to it if the window is minimized. Use the Win32 API function [api]GetWindowLong[/api] to determine if this style is present. Const GWL_STYLE As Integer = (-16) Const WS_MINIMIZE As Integer = &H20000000 Dim pStyle As IntPtr = GetWindowLong(p.MainWindowHandle, GWL_STYLE) If (pStyle And WS_MINIMIZE) <> False Then 'Window is minimized End If You'll need to declare GetWindowLong of course.
  21. Keep in mind that there are numerous attributes under the System.Xml.Serialization namespace that will allow you to better format the serialized XML that is produced from a custom class. Examples of these attributes include XmlElementAttribute, XmlAttributeAttribute and XmlTextAttribute, which define class members as elements, attributes and text, respectively.
  22. The class needs to be serializable to XML, most definately. Since SOAP, the underlying protocol of web services, utilizes XML as its structural markup language all data that is transferred has to be XML, no exceptions. Your class will be serialized to XML before it's sent, and back to the class once it's been received.
  23. This thread approaches your topic from the other direction, but it's useful nonetheless: http://www.xtremedotnettalk.com/showthread.php?s=&threadid=69304
  24. The method depends on the ADO.NET code you're using. We'll need to see whether you're using a DataSet or a DataReader, among various other options.
  25. Load only a portion of the records at a time. When the user reaches either end of the current list, give them the option to display the next set of records, or do so automatically. It is far too impractical to load all 50,000 records at once, and there's no reason to do so. If you're coding for a client who wants all the records shown at once give them a demo of how long it'll take to display 50,000 records. That'll shut them up. ;)
×
×
  • Create New...