Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. Use the RowFilter of the Dataview of the datatable. dv.RowFilter = "MyColumn = '" & SomeString & "'"
  2. A dataset is a container for datatables it is not ment to be placed on a form, I think what you need is a Datagrid then you can bind a dataset as its' dataSource. Here's a sample http://samples.gotdotnet.com/QuickStart/aspplus/default.aspx?url=/quickstart/aspplus/doc/webdataaccess.aspx
  3. Yeah you're on the right track but you may want to move your first line of code into the Change or KeyPress event (if(this.mytxtBox.Text == "") this.mytxtBox.Text = "0";) whichever suits you best.
  4. You should be able to step through the proxy class.
  5. You can combine your idea of panels and George's grouping thing into one viable solution.
  6. Wow, is there any way of Normalizing this table ?
  7. You can use a Panel for this, why can't you resize the form on loading?
  8. If you are the one creating the SQLs then why can't you just add/replace the table names dynamically and leave the rest alone ? (or even have a Case and switch between different variations of a statement)
  9. I should've finished my thought; If it is input by end-users then you should limit them to the table name and the conditions. ie. "Select * From " & myTable & " Where " & someCondition
  10. Are you doing this because the Sql string is input by an end-user?
  11. You can do that towards the end of your page load event. And yes Unload is post Render since as PD pointed out it's the last event.
  12. I bought this one http://www.amazon.com/exec/obidos/tg/detail/-/0735617252/qid=1079623620/sr=1-2/ref=sr_1_2/102-3814095-2644914?v=glance&s=books , It seems all right, I haven't read it yet but as is the case with most MS Press books it's an easy read.
  13. Yes it is. Any time you have variables that make up your statement then it's dynamic.
  14. Did you read the entire paragraph; His sample code is using a parameterized method; "UPDATE [Products] SET [ProductName] = @ProdName, " & _ "[unitPrice] = @UnitPrice, [ProductDescription] = @ProdDesc " & _ "WHERE [ProductID] = @ProductID" or you can replace the params with variables...(of course you will need to declare and assign these variables yourself) "UPDATE [Products] SET [ProductName] = '" & myProdName &"', " & _ "[unitPrice] = " & myUnitPrice &", [ProductDescription] = '" & ProdDesc & "' " & _ "WHERE [ProductID] = " & ProdID
  15. You can do it in the PageIndexChanged event or anywhere else that you assign a value to the CurrentPageIndex property. Compare the DataGrid1.PageCount to the e.NewPageIndex and don't allow less than 0
  16. e.NewPageIndex is read-only, I ment verify its' value prior to assigning it to the CurrenPageIndex of the Datagrid
  17. Robby

    Saving info

    Does the entry from the sales people get save in a database?
  18. Robby

    Enums

    An easy explanation for Enums would be; Let's say you had 4 columns in a table and you access each column/field by doing the following... dim myString as string = myField(1).value It can be hard to remember that the 1st index is CustomerName So the same thing can be achieved this way.... Private Enum myCustomers CustID = 0 CustName = 1 FName = 2 LName = 3 End Enum 'Then anywhere in this class you can do something like this; dim myString as string = myField(myCustomers.CustName).value
  19. Robby

    Session

    What type of authentication are you using?
  20. Check the value of e.NewPageIndex before setting it to the current page
  21. shahab, does this occur soon after you alter the record count of the datatable.
  22. Robby

    Saving info

    Scooter, we need more details on what you want do and the steps you took to acheive this.
  23. The way I see it it's not too far gone, converting each page into a user-control would take a few minutes and the long-term savings would be recognized immediately.
  24. The Request.Form is indeed an ugly way to go, of course there are work-arounds to every problem but in this case I think a re-design may be better suited. Are any of these 4 nested pages ever called directly from a client browser? If not then perhaps you can create user-controls from them or place their child controls within panels on the same page. All this to say; is there no way for you to do all this from a single aspx page?
  25. You cannot set the order of events, this is normal. What you should be doing in your form load events is establishing what needs to be executed on post-back and what does not. In other words only certain parts of your code should run when it's the first time the page is loaded and all subsequent times the code should be ignored. To accomplish this use the following in your page load event... If Not IsPostBack Then 'This is the first time in this page 'Load a bunch of data orr controls. Else 'This is from a button click or a textbox change or dropDownList AutoPostBack 'Do something else here 'NOTE: If let's say it's a button click then don't 'do anything here, handle it in your button click event. End If
×
×
  • Create New...