Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. Robby

    memo

    I think you ment HtmlEncode()
  2. I suggest creating your database objects at runtime instead of these design-time drag/drops or wizards. These samples will get you started http://samples.gotdotnet.com/QuickStart/winforms/default.aspx?url=/quickstart/winforms/doc/DataAccessPlaceHolder.aspx I understand that you want to eliminate repitition of code, if you design the application corectly you will have even less code then you do currently.
  3. In the meantime you can ask any question you have and we'll attempt to help. Have a look here for some online tutorials http://www.xtremedotnettalk.com/showthread.php?t=69808
  4. Using eramgarden' s sample replace all Sql with OleDb for example: change this... Dim cmd As SqlCommand to this.... Dim cmd As OleDbCommand
  5. Have you done a step-through of strSQL and executed directly on the database, i.e. Query Analyzer A couple of your CASTs don't look right.
  6. These 101 samples cover lots and lots of topics in C# and VB http://www.microsoft.com/downloads/details.aspx?FamilyId=08E3D5F8-033D-420B-A3B1-3074505C03F3&displaylang=en
  7. If you don't allow wrap the column will get very wide, if you do allow wrap it will get very tall. I prefer to limit the amount shown in that column/cell to a pre-determined length....You can place a button or something to allow the user to select then view the entire content in a textArea. [size=2][color=#0000ff]Public[/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] LimitChars([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] s [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Object[/color][/size][size=2]) [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]String[/color][/size] [color=#0000ff] [size=2]If[/size][/color][size=2] IsDBNull(s) [/size][size=2][color=#0000ff]Then[/color][/size] [color=#0000ff] [size=2]Return[/size][/color][size=2] ""[/size] [size=2][color=#0000ff]Else[/color][/size] [color=#0000ff] [size=2]Dim[/size][/color][size=2] ss [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]String[/color][/size][size=2] = Convert.ToString(s)[/size] [size=2][color=#0000ff]Dim[/color][/size][size=2] len [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Integer[/color][/size][size=2] = ss.Length[/size] [size=2][color=#0000ff]If[/color][/size][size=2] len > 30 [/size][size=2][color=#0000ff]Then[/color][/size] [size=2]len = 30[/size] [size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]If[/color][/size] [color=#0000ff] [size=2]Return[/size][/color][size=2] ss.Substring(0, len)[/size] [size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]If[/color][/size] [size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Function [/color][/size] In your aspx page, Label or Literal text... text='<%# LimitChars(DataBinder.Eval(Container, "DataItem.myColumn")) %>'
  8. Instead of using Session, do this.... in your Page_Load event.... If not IsPostBack Then LoadMyDataGridRoutine() End If
  9. Try this... dim txt as textbox = CType(e.Item.Cells(1).Controls(0), TextBox) myNewSomething = CType(txt.Text, Integer) or in a EditItemTemplate of a TemplateColumn dim dd as dropdownlist = CType(e.Item.FindControl("myDropDown"), DropDownList) myNEwSomwthing = CType(dd.SelectedItem.Value, Integer)
  10. You can use RegisterClientScriptBlock() to insert the code to pre-load the images
  11. Use Server.Transfer() instead
  12. This has been covered many times on these boards....(more then the two that I've listed below) Either one makes no difference for "real-time apps". http://www.xtremedotnettalk.com/showthread.php?t=73611 http://www.xtremedotnettalk.com/showthread.php?t=84580
  13. Most times going back to the source is not an option.
  14. Use the rowfilter method then re-bind the datagrid
  15. Do you want for eample "Company" in each row of the first column or as a header for certain rows?
  16. Have you tried creating a new project and adding the files to it one at a time from VSS ?
  17. Sorry, on your list I miss-read IIS 5.0 for IE 5.0, so forget what I said.
  18. One of the prerequistes of VS is IE 6.0, I don't know how you got this far without it.
  19. You can place a condition in the OnDayRender (I think that's what the event is called)... use this event to disable the specific days you want to disable.
  20. You need VS 2003 for this option.
  21. Robby

    insert tag

    try... MyPanel.controls.add(new literalcontrol("<br>")
  22. The BoolStop is better than invoking an error, but better still would be if you use Threading, then you can stop a process in a clean managed way.
  23. You're saying that if the length of the textbox is > 2 then you want to enable the textbox, how will the user enter theses characters if it was disabled to begin with? Unless you are populating the textbox from the server? If so then the following should work. if textbox1.text.length > 2 then textbox1.enabled =true else textbox1.enabled =false end if
  24. Try this... dim txt as texbox = CType(e.Item.Cells(1).Controls(0), TextBox) // Cell(1) being the column index or if you used TemplateColumn / EditItemTemplate to place the controls dim dd as Dropdownlist = CType(e.Item.FindControl("myDropdown"), DropDownList) BTW, the above code goes in the UpdateCommand event of the datagrid
  25. There are Fixed-Length and Variable-Length, have a look at this chart http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_7msw.asp You can use ntext in place of the Access Memo
×
×
  • Create New...