Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. You can save it to a file.
  2. Regarding the message "'TextBox' must be placed inside a form tag with runat=server." Your asp controls are runtat server, this error is because some of your controls are being placed outside the main form. I'll try and take the time later to step through your code and see what's going on.
  3. try messagebox.show("hello")
  4. You adding a Placeholder each time you loop. I don't know if you want the same thing for the Panel. Consider placing these two lines before your loop... Controls.Add(PlaceHolder1) PlaceHolder1.Controls.Add(Panel1)
  5. In this case I would just use a Public Property to Get/Set the UserID.
  6. "DoEvents resets the cursor to the default" Oh, I can't figure out why. Just to test, place the cursor line in the loop.
  7. quwiltw ... Yeah, I hadn't seen your post yet.
  8. He has 2 ASP buttons, and if you read my first reply, I said change one to regular HTML button, this will allow you to run client side scripts (without submitting). yeah quwiltw got what I said.
  9. I was so focused on the question itself that I didn't consider it, as quwiltw mentioned XML is really your best route.
  10. No you can't.
  11. bungpeng, if you are using an HTML button and just calling some routines, there is no reason to "form_submit = false", because it's not even a Submit button.
  12. Yup. then use Regular Expressions to retrieve them. http://www.xtremedotnettalk.com/search.php?s=&action=showresults&searchid=148079&sortby=lastpost&sortorder=descending
  13. easy solution... Reset the itm when the preview is finished (as well as the actual print page) Place the following in your code. Private Sub PrintDocument1_EndPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument1.EndPrint itm = 0 End Sub
  14. The idiot that put this sample together (not me) forgot to reset the itm count whent he preview is finished. I'll fix it in a sec.
  15. Hmm, I had previously only prviewed the report, I tried to print it and you're right, it only prints the headings. I'll play around with it and post back in a few minutes.
  16. One thing that stands out is that you don't need the IF line because you're already doing the While loop. And put a Doevents after the WaitCursor line.
  17. Yeah it is ugly, but it should print whatever you see in the preview, I don't know much more than that.
  18. The first thing I thought of using was regular expressions, but a real simple a fast approach would be to use the Split function... strSwipeData = "^Smith/John myMid^" strSwipeData = strSwipeData.Replace("^", "") Dim temp() As String Dim temp2() As String temp = strSwipeData.Split("/"c) temp2 = temp(1).Split(" "c) m_strName_Last = temp(0) m_strName_First = temp2(0) m_strName_Middle = temp2(1)
  19. You can optimize this in VB6 as well as in VB.NET.
  20. wayko, I think he ment Windows Forms. (not sure)
  21. Look at the top section where .NET places all the design-time code, you can modify the Select statement there or simply create the dataAdapter at run-time.
  22. ...I want the other button to execute some code without submitting the form... Do you want to execute the code on the server or client? If it's server you need to postback, if it's client then add an HTML button and use vbScript or JavaScript.
  23. An easy way may be to load the database results into array, then format as you wish.
  24. It looks like you want txtLast to display the value of Last for user 'tehon3299', am I correct? try this... Private Function GetTableValue(ByVal sUser As String) As String Dim drSqlReader As SqlDataReader Dim SqlCMD As SqlCommand Dim SqlCN As New SqlConnection(Conn)'Conn is your connection string Dim strSql As String, sTemp As String Try If SqlCN.State = ConnectionState.Closed Then SqlCN.Open() strSql = "SELECT Last FROM tmUserInfo WHERE UserID = '" & sUser & "'" SqlCMD = New SqlCommand(strSql, SqlCN) drSqlReader = SqlCMD.ExecuteReader() While drSqlReader.Read sTemp = CType(drSqlReader.Item("UserID"), String) End While Catch sTemp = "" Finally If Not SqlCN.State = ConnectionState.Closed Then SqlCN.Close() If Not drSqlReader.IsClosed Then drSqlReader.Close() If Not SqlCMD Is Nothing Then SqlCMD.Dispose() End Try Return sTemp End Function 'call the function like this... txtLast.Text = GetTableValue ("tehon3299")
  25. messagebox.show will not show on an aspx, step-through your code or use response.write(sResults)
×
×
  • Create New...