Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Cookies are stored by the browser and as such are specific to the browser on a given PC (admittedly if the pc is part of a domain and roaming profiles are in place this isn't strictly true). It might help if you gave a bit more information about what you are trying to do / what problem you are attempting to overcome.
  2. Just as a quick idea - would it not be easier to use DataViews rather than selecting the actual datarows?
  3. Ultimately you can't - you would need to get the thread to call back into the form and then have the form close itself using the same model you are using with the SetAccountsTextCallback.
  4. It looks as though the GetElementById call isn't finding the element and therefore returning Nothing - are you sure the element does exist?
  5. Do you get an option for New Web Site on the file menu? if not what version of VS are you using (i.e. professional, express etc.)
  6. Could you post the code you have? Just out of interest is there a reason you are including the first insert in the transaction if the second one is all you care about? Or is it that if the second one fails you want to roll back both inserts?
  7. IIRC it should add another dll to your bin folder - simply make sure that you copy that file to the server as well.
  8. Have you checked to see what the returned HRESULT means? It might indicate the source of the problem if there is an associated error.
  9. C++ (managed or otherwise) isn't really my strong point, however I think the NativeWindowsEvent is a delegate of type void xxxxx(ref Message Msg), other than that I'm struggling with the c++ syntax. Have you tried declaring a member of type NativeWindowsEvent?
  10. IIRC if the device is picked up through bluetooth as a speaker or microphone then it should be possible to select this as an output device. Off hand though I haven't a clue where to do this but it is probably part of the multimedia stuff...
  11. What code are you using to perform the compare? If \n isn't matching you might want to also try \n\r just in case.
  12. You could simply configure the virtual directory under IIS to only allow https connections - would that not be enough?
  13. Easiest way might be to look at the Ajax toolkit and simply put the formview in an update panel.
  14. Are you wanting to effectively keep the contents of the drop down list constant between postbacks and maintain the selected item?
  15. Did you initially try using either VS or tlbimp.exe to generate the wrapper or are you trying to do it manually?
  16. You could check the IsPostBack property within the code behind - if it returns true then do not rebind / reinitialise the controls on the master.
  17. IIRC certain methods under the reflection namespace can prevent inlining - I just can't remember for the life of me where I heard it though... The main reason I tend to use the stackframe is it can provide more information than just the method name (like the file name for one).
  18. Pretty much it. Various optimisations are performed at runtime one of which is method inlining - this avoids the overhead of a function call by merging a small routine into the calling routine's body. This means the stack trace for a release build can differ to a debug build. Try putting the above code into a simple method of it's own and call this method from a form load or button click - try this with a debug build and then try with a release build run without a debugger attached and notice the difference.
  19. The following snippet should get you started, the stack frame can also give access to a lot more information than just the method name. Also the GetFrame call takes a 0 based index with 0 being the current method and 1 being the calling method etc. StackTrace st = new StackTrace(0, true); StackFrame sf = st.GetFrame(0); MessageBox.Show(sf.GetMethod().Name); be aware that in a release build run without a debugger attached the results may not accurately reflect the call stack due to method inlining etc.
  20. Chuck this into a blank form and you should get the general idea Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SiteURI As New Uri("http://www.xtremedotnettalk.com/showthread.php?p=465032#post465032") Dim wc As New WebClient wc.DownloadStringAsync(SiteURI) AddHandler wc.DownloadStringCompleted, AddressOf Test End Sub Private Sub Test(ByVal sender As Object, ByVal e As DownloadStringCompletedEventArgs) Dim newstring As String = e.Result End Sub
  21. If you require the collection to hold multiple types of items and therefore type safety isn't a concern you may as well stick with a hash table. If the various objects derive from a common base class or implement the same interface then you could use a generic using the base or interface. Out of interest is there a reason why you need to store such different objecttypes in the same collection?
  22. Public Function ConvertBytesToMBString(ByVal BytesDouble As Double) As String Return (BytesDouble / 1048576).ToString("#########0.#0 MB") End Function should do it.
  23. XAML can do a lot of fancy UI stuff, including the separation of layout from code for a lot of the day to day things. As an example the author of this book has a sample RSS reader done entirely in XAML and no procedural code used at all.
  24. SQL Server replication can definately work for you in this situation, not all types of replication are designed to keep copies in sync. Make each of the office servers a publisher of the database (or relevant parts of it) and make the central server a subscriber. This way all changes will be consolidated on the central server but no other changes will be propagated out.
  25. IIRC I think it might be just an issue with C# intellisense in VS 2002 / 2003 - it gets a lot better in later versions ;)
×
×
  • Create New...