Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. There's a high probability you should be using a StringBuilder instead. Imports System.Text Dim builder As StringBuilder = New StringBuilder(100)
  2. The database connection code is exactly the same in a Web Form as it is in a Windows Form.
  3. Your best bet is to purchase a commercial solution: http://www.xheo.com/products/licensing/default.aspx
  4. Yes. This is one of the many reasons why frames are usually a poor choice.
  5. Just to clarify the class name for a non-.NET application text box would be "EDIT", while the class name for a .NET application text box would be "WindowsForms10.EDIT.app1".
  6. Unless Request.UrlReferrer is a null reference then Response.Redirect(Request.UrlReferrer.ToString()) should work. Being as you mentioned a null reference exception it is highly likely a HTTP_REFERRER header wasn't set by the client, either because of a firewall, a proxy server, or some other filter or intermediary.
  7. The name of the control has nothing to do with the Win32 windowing system. The control name is just a programmatic method of addressing an object that will ultimately be rendered as a window of class type EDIT. The code provided by dynamic_sysop should work as is.
  8. They did "build" a common language: MSIL.
  9. You can't submit (POST) to another page using a server-side form in this version of ASP.NET. Either use a HTML form, which doesn't run on the server-side (e.g. no "runat" attribute), or re-work your code to postback to the same page, as is the intended behavior of the ASP.NET model.
  10. Place the assembly (DLL) in your Web application's /bin folder and import the namespace the code requires. <%@ Import Namespace="MyAssembly.MyNamespace" %>
  11. [msdn=System.Web.HttpRequest]Request.UrlReferrer[/msdn]
  12. Suffice it to say that it is computationally easier to use two 8-bit fields (2 bytes) when converting between numeric data types and boolean values than it is to use a single 8-bit field. This means while you wouldn't decrease internal efficiency of a boolean data type stored as 8-bits conversions between other data types would suffer. Search for the phrase "two's complement" to learn more.
  13. CAS won't allow COM interop in ASP.NET applications by default. You'll need to enable it in using the MSCorCfg utility, which should be in the "Administrative Tools" folder on your computer's start menu.
  14. Of course little of it has to do with the popularity of the software... *cough*.
  15. There is the common method of polling a file, [api]SendMessage[/api], [api]ReadProcessMemory[/api], DTE, a shared DLL, registry keys, RPC, pipes, COM servers... etc. None of these work well in a .NET environment however, and I strongly recommend against many, if not all of them. Socket-based interprocess communication under .NET is far more appropriate and wide spread.
  16. The example "Device Change", attached, should be a decent start.devicechange.zip
  17. You need to ensure the current application domain is configured to use Windows security. Dim app As AppDomain = AppDomain.CurrentDomain app.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal)
  18. Application/session state in ASP.NET is different from the application/session state in classic ASP. They use two different data stores. They do not "interact" with one another out-of-the-box.
  19. Arguably you shouldn't need to return the DataReader object at all. It's intended use is fast forward-only open-late close-early data access. Instead encapsulate the data it contains in an application-defined class. If the reader is returning data about a customer define a class named Customer and loop through the returned results, filling a new instance of the Customer class and returning it in place of a reader or DataSet. Doing so will yield a "truly OOP" design which, while not always practical to implement, is what you designated in your request.
  20. There are a half-dozen methods that could be eimployed, but none really offer the same benefits as sockets do. Granted sockets aren't the perfect solution, but they are by far the most used method of interprocess communication.
  21. Dim p As WindowsPrincipal = DirectCast(Thread.CurrentPrincipal, WindowsPrincipal)
  22. Session state does not span across ASP.NET to ASP, nor the other way around.
  23. It's highly likely that it is working but you're simply not noticing. Windows services run on the SYSTEM or Network accounts. Their desktops are separate from yours, and any window created will only be displayed in their context.
  24. Loop through the container's Controls collection.
  25. The stores persist indefinately. Any "timeout" scheme would have to be implemented manually.
×
×
  • Create New...