Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. Use 'Insert Into Table1' instead of Select
  2. Always code behind. By the way, copy/paste my sample because once again you are off.
  3. Private sub GoToLineAndColumn(RTB as RichTextBox , Line as integer, Column as integer) dim offset as integer = 0 dim i as integer = 0 For i = 0 to Line - 1 if i < RTB.Lines.Length then offset += RTB.Lines(i).Length + 1 end if next RTB.Focus() RTB.Select(offset + Column, 0) end sub
  4. As I posted "you don't need the DataBinder" Try the code as is in my last post
  5. Did you paste exactly this ... It does work for me as is. <asp:HyperLink Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"name")%>' NavigateUrl='/GB.Web/BarOwner/BarProfile.aspx?id=<%# myFunction(Container.DataItem("idNum"))%>' ID="Hyperlink1" ></asp:HyperLink>
  6. Sorry, I just noticed something... you don't need the DataBinder.. do this instead.. <%# myFunction(Container.DataItem("idNum"))%>
  7. A couple of " and & were miss-placed <asp:HyperLink Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"name")%>' NavigateUrl='/GB.Web/BarOwner/BarProfile.aspx?id=<%# =myFunction(DataBinder.Eval(Container.DataItem,"idNum"))%>' ID="Hyperlink1" NAME="Hyperlink1">
  8. Create a function to toggle ASC and DESC, save the current sort direction in a Session variable (or whatever). In your function check what the sort direction is and do the opposite. something like this... Private Sub SortDataGrid(ByVal SortExpression As String) Dim sDir As String = Convert.ToString(Session("SortDirection")) If SortExpression = Convert.ToString(Session("Sort")) Then If sDir = " ASC" Then sDir = " DESC" Else sDir = " ASC" End If End If dv.Sort = SortExpression & sDir Session("Sort") = SortExpression Session("SortDirection") = sDir End Sub
  9. replace StringOperations.Encrypt with your own function and then in that new function call StringOperations.Encrypt.
  10. Create a Public function and call it like this.. (you can do the same thing with public variables as well) <% =myFunction()%> 'code-behind Public function myFunction() as string return "some value" end function
  11. Difficulty: Medium Language: VB & C# Title: Professional ASP.NET 1.0 Publisher: Wrox ISBN: 1861007035 Difficulty: Medium Language: C# Title: Professional ADO.NET Programming Publisher: Wrox ISBN: 186100527X Difficulty: Easy Language: VB & C# Title: Developing Windows-Based Applications Publisher: MS Press ISBN: 0735619263 Difficulty: Easy Language: VB & C# Title: Developing Web Applications Publisher: MS Press ISBN: 0735615845 Difficulty: Easy Language: VB & C# Title: OOP with Microsoft VB.NET and C#.NET Publisher: MS Press ISBN: 0735615683
  12. You can add a Custom Validater to each textbox and have them all point to the same client-side function which will validate the form. Use JScript or VBscript in the function. Follow the tutorials that PlausiblyDamp linked.
  13. http://samples.gotdotnet.com/quickstart/ http://www.dotnetjunkies.com/
  14. Also, place Option Strict On and Option Explicit On at the top of wach code page.
  15. firstly you should be using SqlClient instead of OleDb. The second argument in your Parameters.Add method should be the SQL data type ie. SqlDbType.Text or SqlDbType.Int etc...
  16. http://www.codeproject.com/useritems/enhanced_page_redirects.asp
  17. Transfer will retain the viewstate redirect will not
  18. Dim s as string = request.querystring("var1")
  19. Instead of DisplayMessage being a sub it should be a function that returns a string. public function DisplayMessage () as string return "hello..." end function
  20. Is the SMTP configured on your machine?
  21. To execute a SP you can set the SqlCommand method myCommand.CommandType = CommandType.StoredProcedure If you want to add paremters, declare a SqlParameter and set its' Direction.
  22. This thread is several months old, please start a new thread.
  23. Mike is this a Windows app? If so then you can't use System.Web.Mail Actually adding a ref to SystemWeb.dll might work.
  24. Robby

    webserver

    What do you mean by "make your own webserver"? Do you want to host your own web application to the public?
  25. it's all in VS help http://ms-help://MS.VSCC/MS.MSDNVS/vblr7/html/vagrpdatatype.htm
×
×
  • Create New...