Jump to content
Xtreme .Net Talk

auxcom

Avatar/Signature
  • Posts

    49
  • Joined

  • Last visited

auxcom's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for reply. I will think about that solution Here is the other solution I found. http://www.timvw.be/control-the-order-of-properties-in-your-class/ I just haven't make it work :)
  2. I hope you can share your solution to this. I also need this.
  3. Hi! I have a class inherited from CollectionBase. It binds perfectly to a control (DataGrid or GridView). What I want is to change the order of the CollectionBase members so that it will appear as I want it to the DataGrid as columns? Here is some code. Public Class Contact Private Name As String Private Fax As String End Class Public Class ContactCollection Inherits CollectionBase Default Public Property Item(ByVal index As Integer) As Contact Get Return CType(List(index), Contact) End Get Set(ByVal value As Contact) List(index) = value End Set End Property End Class When I do: DataGrid.Datasource = ContactCollection A column name "Fax" appear first and the "Name" as second column of the Datagrid. I want to make Name to be the first column and Fax as the second column. I hope there is a solution by adding some code in the Contact and ContactCollection class not by re-ordering the columns of the Datagrid. Thanks! I appreciate any help.
  4. Hmmm... this seem do the trick. In the SQL Profiler, I see the Audit Login and Audit Logout items immediately, showing connection has been close immediately. But connection pooling is recommend for ADO.NET.
  5. Obviously in production. I have experienced this error in my old web app project. "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached" I'd to avoid this to happen in my current project.
  6. I'm using SQL Profiler to monitor connection created by my Web Application. I noticed that calling the Close method didn't close immediately the connection, it takes 1 to 5 minutes before the connection will be closed in the SQL Profiler. I think SQL Profiler is checking connection in real time, Is there a way to make the connection close immediately? Even using this simple code below will make the SQLConnection behave the same. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TestConn() End Sub Sub TestConn() Dim cn As New SqlClient.SqlConnection cn.ConnectionString = Utility.ConfigReader.ConnectionString cn.Open() System.Threading.Thread.Sleep(5000) cn.Close() cn.Dispose() End Sub Thanks!
  7. How can I make my web project setup like the Duwamish sample project. The aspx and related files are saved in the \program files\...\web\ folder not in the \inetpub\wwwroot\..\ folder? Thanks!
  8. Thanks for the link.
  9. I have found so many code samples about sending mail using the System.Web.Mail namespace and test it out. What do this error means: Could not access 'CDO.Message' object. I have verified that I have SMTP service running in my XP. The server name is correct. What would I have missed out? Another questions is that our company uses Exchange for our mail system which is we have no control. I just my local SMTP (the one included in IIS) for this. Do I need to configure my Default SMTP Virtual Server??? Thanks in advance!
  10. Wow! Thank you so much.... great explanation and examples! Thanks again. But another questions :-), in VB it have the With.. End With statements. What is its equivalent in C#?
  11. Im moving from VB to C#. What is the equivalent of a Module in C#? In VB, I declare all my global variables, constants and functions in a Module. And lastly, in the code editor, what is the shortcut key to delete a line. Thanks!
  12. Good day, I have this problem. When I enable the XP theme in app. The datepicker Checked property doesnt return the correct state of the control's checkbox. There are some case that eventhouhg the checked is false, it still return True. But when I remove the XP theme, it now returns the correct check state. I hope someone would try this and devise a workaround on this. I just like to retain the XP theme of my app. Thanks!
  13. I have a table: projid unit amt a 1 1.4 a 1 1.2 b 1 1.4 c 2 3.0 c 1 1.2 I want an output like projid unit a 2 b 1 c 3 projid amt a 2.6 b 1.4 c 4.2 The first by unit and the second is by amount. The results will be shown in a report. Thanks
×
×
  • Create New...