Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. Which argument do you need? What exactly do you want to do? somthing like this? Dim dlgOpen1 As New OpenFileDialog() dlgOpen1.Filter = "Text files (*.txt)|*.txt" dlgOpen1.CheckFileExists = True dlgOpen1.ShowDialog() Dim strPath As String = dlgOpen1.FileName
  2. Before going into any detail, have you done/practiced any asp.net apps or pages?
  3. are you adding the Text box at design time or run time? when you do text1.text = "wow", does it appear on the page?
  4. originally posted by yaniv
  5. you asked the same question on EVBF, is this ASP.NET or regular ASP (old)?
  6. you can use SelectedIndex with any style.
  7. Since you attempted this on 2k and xp, it must be your hd. (I'm guessing) Do any other programs act this way?
  8. by the way, you need to "Imports System.Data.OleDB" Also, most of the samples you find may use SQL Server, you can usually just change SqlCommand to OleDbCommand or SqlConnection to OleDbConnection, etc...
  9. Shouldn't we move away from using COM? here a simple function that Updates a record in Access, You can alter the function to Insert Into or Delete records. Private Function SetTableValue(ByVal nID As Integer, ByVal sField As String, ByVal nValue As Integer, ByVal sTable As String) As Integer Dim SqlCMD As OleDbCommand Dim SqlCN As New OleDbConnection(Conn) Dim recordsAffected As Integer, strSql As String Try strSql = "UPDATE " & sTable & " SET " & sField & " = " & nValue & " WHERE ID = " & nID If SqlCN.State = ConnectionState.Closed Then SqlCN.Open() SqlCMD = New OleDbCommand(strSql, SqlCN) recordsAffected = SqlCMD.ExecuteNonQuery() Catch recordsAffected = -1 Finally If SqlCN.State = ConnectionState.Open Then SqlCN.Close() If Not SqlCMD Is Nothing Then SqlCMD.Dispose() End Try Return recordsAffected End Function
  10. Does it freeze during a run (execute) or the IDE itself (during coding)? Is it ASP or VB Foms?
  11. this may help.... http://www.xtremedotnettalk.com/showthread.php?s=&threadid=49582
  12. I still can't get this to work... the value of appProcesses is always 0 Public Sub New() MyBase.New() Dim appProcesses As Process() = Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName) If appProcesses.Length > 1 Then MsgBox("Triggered") End If InitializeComponent() End Sub
  13. I'm curious, is the MsgBox("Application.Exit Triggered") even triggering?
  14. Otherwise there's no point in doing this in .NET
  15. you should be placing this function in either the Code-Behind or in VB tags like this... <script language="VB" runat="server"> <script> It's important that this is run or the server.... You can't run this client-side, nor as javascript.
  16. It's acually one line of code, (the line with the INSERT INTO) try this function if you wish... Private Function SetTableValue() As Integer Dim SqlCMD As SqlCommand Dim SqlCN As New SqlConnection(Conn) 'Conn is your connection string Dim recordsAffected As Integer, strSql As String Try strSql = "UPDATE myTable ...." 'OR strSql = "INSERT INTO myTable..." If SqlCN.State = ConnectionState.Closed Then SqlCN.Open() SqlCMD = New SqlCommand(strSql, SqlCN) recordsAffected = SqlCMD.ExecuteNonQuery() Catch recordsAffected = -1 Finally If SqlCN.State = ConnectionState.Open Then SqlCN.Close() If Not SqlCMD Is Nothing Then SqlCMD.Dispose() End Try Return recordsAffected End Function
  17. In the sample, have a look at the Sub AddAuthor_Click
  18. I closed the poll, it is not relevant to your question, and well quite frankly, if we are here, well we must enjoy it.
  19. Just for fun, place a couple of ASP textboxes on your page then in the browser look at the code (View Source) you will see that it renders HTML textboxes. The point is, whichever one you use will be put together on the server then sent to the client. And the speed on the server should not even be an issue.
  20. I don't understand why you don't want to use Style?? Simply copy/paste Volte's example it should make things more consistent.
  21. Or you can create a couple of ASP Textboxes, using Styles as Volte pointed out.
  22. I think you may need to write to the Eventlog for this to work.
  23. what is the value of third parameter in your New DataView(...)?
×
×
  • Create New...