Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. I put this sample together a couple of years ago, it should help .... http://www.bassicsoftware.com/popup.aspx?b_id=157
  2. You need to import system.Web, then do this in your constructor; I'm sure you can figure out from here. private string _sessionId; private HttpContext _httpContext = null; public class1(string currentSessionID) { _httpContext = HttpContext.Current; _sessionId= currentSessionID; } I would make this a base class to handle all state, it comes in handy when you have multiple developers.
  3. This has nothing to do with XP being on the E drive as this is this drive that you boot for XP. I have many partitions and never had a problem. As long as you keep the framework in the boot drive it should work. Check that you don't have any problems with MSI, maybe by re-installing it. http://www.microsoft.com/downloads/details.aspx?FamilyID=5fbc5470-b259-4733-a914-a956122e08e8&DisplayLang=en
  4. As far as I know you will need to do the calculations manually
  5. Sorry for the late reply; Since the stored proc is defaulting the varchars to null values you don't need to pass any null value to it from your code. As a matter of fact you should not pass something like "NULL" on quotes because it is seen as a litteral string value of NULL and not actually Null or Nothing.
  6. You should be able to request a copy from wherever you purchased it. If not, most all the prereq items are available for download at MS for free.
  7. You could use this method in a stored proc... you need to Return your new id... something like this ... Declare @id int --Do your insert here SET @id = @@IDENTITY Retrun @id __________.NET code Friend Function SomeInsert() As Integer Dim ret As Integer = 0 Dim cmd As New SqlCommand Dim cn As New SqlConnection(Conn) Try Dim sp As SqlParameter = cmd.Parameters.Add("RETURN_VALUE", SqlDbType.Int) sp.Direction = ParameterDirection.ReturnValue cn.Open() cmd.Connection = cn cmd.ExecuteReader(CommandBehavior.Default) ret = CType(cmd.Parameters("RETURN_VALUE").Value, Integer) Catch ex As Exception Throw New Exception(ex.Message) Finally If cn.State = ConnectionState.Open Then cn.Close() If Not cmd Is Nothing Then cmd.Dispose() End Try Return ret End Function
  8. The overhead with Strongly Typed Datasets is massive but it shouldn't make any difference that you have 20 or 200 users, each client will cache their own dataset.
  9. You need to access the dates like kahlua001's reply, but keep in mind that SelectedDates is a collection, so do something like this... Dim startDate As DateTime = Calendar1.SelectedDates.Item(0) Dim endDate As DateTime = Calendar1.SelectedDates.Item(Calendar1.SelectedDates.Count - 1) Then place startDate and endDate in your SQL statement.
  10. Are sure that the path to the js file is correct and that you have access to it?
  11. There are three items you can/should query here... dd.SelectedItem.Text (the actual text displayed in the UI..."Processor Time" or "User Time") dd.SelectedItem.Value (the underlying value...1 or 4) dd.SelectedIndex (The index of the collection starting with the number zero...0 or 1)
  12. You should place the entire chapter 06 in localhost (or a single virtual dir), it looks like it may reside partially in 2 locations.
  13. Yes you can easily use the same code for WinForms and WebForms. Your main goal should be to seperate the code that accesses the database and the code that follows your business rules from the UI (Code that renders your pages or forms).
  14. Run this in SQL Server and see if the results are as expected... (Of course you may want to replace the vars with hard-coded values for the test run) SELECT @ID =UserID FROM tblUsers WHERE FirstName = @FirstName AND LastName = @LastName
  15. A TWIP is 1440th of an inch (approx) irrelevant of the screen resolution.
  16. Give the input an ID... <input id="txt1" type="file" name="txt1" runat="server"> Then make sure that the code-behind declares it as a System.Web.UI.HtmlControls.HtmlInputFile HtmlInputFile txt1;
  17. After you've loaded the box use the Add method to add "--select item--" to index 0.
  18. How about an html table?
  19. you can declare the label before you actualy call the New... Dim label1 as Label labelarea(312, 344, 64, 40, " text here ", label1) Public Sub labelarea(ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal textValue As String, ByVal labels As Label) labels = New Label labels.Location = New System.Drawing.Point(x, y) labels.Name = "Label1" labels.Size = New System.Drawing.Size(width, height) labels.BorderStyle = BorderStyle.FixedSingle labels.Text = textValue labels.TextAlign = ContentAlignment.MiddleCenter Me.Controls.Add(labels) End Sub
  20. Are there changes made by the user to these selected rows?
  21. Can you post some of your code?
  22. First step: Ensure that your data loading method is surrounded by If Not IsPostback
  23. try this Dim x As Integer = 48 If x Mod 2 = 0 Then 'true Else 'false End If
  24. Do you have a specific question or problem you're stuck on?
×
×
  • Create New...