Help Please: .NET + SQLServer + Concurrency Violation

Discussion in 'Programming & Software Development' started by Deltoid, Oct 4, 2005.

  1. fox1

    fox1 Member

    Joined:
    Jun 28, 2001
    Messages:
    3,086
    Location:
    Brisbane
    edit whoops, saw Elyzion wrote the same thing.

    deltoid, yes you can use multiple querystrings to do what your asking, tho its a pain in the ass, you can do it. What exactly is your question?

    are you having trouble pulling 2 lots of datasets from the db on the 1 page?

    are you doing code behind or is all your code on the .aspx it self?
     
    Last edited: Oct 7, 2005
  2. OP
    OP
    Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Nah I can pull in two datasets. I just wanted to try and do that page in two seperate frames. Mainly for modulization I guess. The master and detail parts of the page are pretty much independant of eachother but need to be displayed together. So that is why I was thinking I could just use frames to do it. But I can't work out frames.

    If you guys don't follow me thats cool. I will just do the master and detail all in the one aspx page

    EDIT: And the only code in the aspx page is presentation stuff. I've got the rest of the stuff happening in my business tier.
     
    Last edited: Oct 7, 2005
  3. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    So basically you have an invoice with all the purchases?

    and its listing the products fine, however you want to be able to edit the individual product lines? Why don't you have them edible all on 1 page?
     
  4. OP
    OP
    Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    I say 'lines' but they are the fields are too big to actually fit on lines. Althought, I will see if I can fit them in a line then perhaps I can just use a datagrid. I will see what I can do, have an exam today which I should start studying for so will get back onto it tonight
    :thumbup:
     
  5. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    Eww datagrid, those are slow and messy, i use repeaters, their faster and i get to not use tables.
     
  6. OP
    OP
    Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Repeaters are read only though arn't they? I need this page for viewing/modifying/inserting new lines (not sure if you can edit a datagrid. I just assume you can as you can in the windows forms. If you hadn't noticed yet this is my first time using ASP.NET, I've only had experience with .NET making desktop apps or console programs. Its also my first time using C#. I wasn't taught it but I get extra marks if I use more then one language so I'm using VB.NET and C#. I've found C# is pretty much java for .net which is good because I know java)

    I'm heading to uni soon, when I get there and can access the SQL database (I setup the database yesterday but forgot to insert a record into the users table so I can log in) I will put a link and show what I'm doing. The web site is ugly but been just concentrating on functionality for now and I will do some basic pretting up once that is completed.
     
  7. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    when you create the event:

    rptProductList.ItemDatabound += ....

    theres another event called ItemCommand, which creates a big ass view state (unless you turn off the enableviewstate on the things you don;t need) but you can access any individual piece of data in that repeater using the item command.) Its also how you do repeaters inside repeaters ;)

    rptProductList.ItemCommand +=
     
  8. OP
    OP
    Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    so it is possible to edit the data in a repeater? I will have a think about it while I'm on my way to/from uni and try and design this the best way I can to result in me writing less code as I just want to get this thing finished now. I really think I chose to make too large an application for one person in the timeframe I had.
     
  9. fox1

    fox1 Member

    Joined:
    Jun 28, 2001
    Messages:
    3,086
    Location:
    Brisbane
    buddy, any chance of an example of an editable page data without using viewstate?

    I've done jack shit of asp.net as well.
     
  10. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    Haha, i was given 2 weeks to write a complete site for an online ticket system that prices the seats depending on the movie theater location > theather room> seat location > person pricing (child, adult etc etc)

    As well as validate to make sure the seats still exist for the time that the people want to buy the tickets for before i charge their credit card. as well as display all the movies with pages to display all the info and viewing times for the one movie so on and so forth.
     
  11. Elyzion

    Elyzion Member

    Joined:
    Oct 27, 2004
    Messages:
    7,449
    Location:
    Singapore
    The only things you should ever need viewstate for is forms/buttons. If you place a asp:literal, or an asp:label, so on and so forth, the viewstate for them is still there.

    So say on your page your listing 20 products which displays
    Name
    Image
    Description
    Price
    Quantity
    A link
    and a Button

    Your viewstate will hold all 7 pieces of data for each record displayed. So what you can do is just add:

    enableviewstate="false" to all of the fields except for the button, now you only have 20 pieces of data, 1 for each record displayed.
     
  12. OP
    OP
    Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Yeah, problem for me though is that I'm trying to learn ASP.NET while using it. So little things take me ages to work out. I could have finished this in a day or two if I was using windows forms as I already know how to do them.

    At least my work has been cool though letting me have time off this week and next to finish it. I would have sucked at work anyway. Its bad enough switching between VB.net and C# (I keep making syntax errors) to go to work and program in another language would drive me crazy (we use a pascal style language).
     
  13. OP
    OP
    Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Ok, just an update.

    I've been meaning to post the link to the site for awhile just didn't want any one to find a bug before it got marked. After the pain in the arse it was to make I didn't want to have to deal with another bug found before I knew my mark.

    Anyway just got my mark. 80% which equates to 28%/35%. I'm happy with that. I expected worse as I really think the quality of it was crap.

    Here is a link to it. I can't remember anyones username or password though. I will get my assignment next thursday when I'm at uni next so will post again then with the login.

    Thanks to everyone that posted and helped me out. I really apprechiated it.
    http://fitdwgp01.fit.qut.edu.au/n4420179/ITB642/Web/index.htm
     

Share This Page

Advertisement: