1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help You in ASP.NET !

Discussion in 'C#' started by Mohammed Elnahrawi, Dec 1, 2005.

  1. #1
    Hi all ,

    If any one have any question in ASP.NET please feel free to ask me

    Thanks

    Mohammed
     
    Mohammed Elnahrawi, Dec 1, 2005 IP
  2. aworldh

    aworldh Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2

    My site is distributed across multiple servers in a Web farm. Users will be able to navigate through the pages of the site and select products for purchase. I am using DataSet object to save their selections. I want to ensure that each user’s shopping cart DataSet object is saved between requests when the user is making purchases on the site.
    Shall i use Cache or StateBag object or HttpSessionState object .
    What do you suggest?


    Welcome to DP.
     
    aworldh, Dec 3, 2005 IP
  3. riz

    riz Peon

    Messages:
    82
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Since each visitor is assigned a unique session id, session variables are very efficient. Also, the clean up of abandoned carts at the end of a session, if stored in a session variable, can be automated by destroying all session variables in Session_End event in global.asax.
    
    protected void Session_End(Object sender, EventArgs e)
    {
               Session.RemoveAll();
    }
    
    Code (markup):
     
    riz, Dec 3, 2005 IP
  4. Mohammed Elnahrawi

    Mohammed Elnahrawi Peon

    Messages:
    64
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    At first I don't suggest the cache object because it may cause problems , you may lose all data that's saved on it if the memory on the server is fading or the application get restart or any reason

    So .. Session State or ViewState? please read this quotation (dotnetjohn.com/articles.aspx?articleid=71) and you can get the answer

    Mohammed
     
    Mohammed Elnahrawi, Dec 3, 2005 IP
  5. aworldh

    aworldh Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yeah, session state is the best option.
    Thanks and welcome to DP.
     
    aworldh, Dec 4, 2005 IP
  6. adbie

    adbie Peon

    Messages:
    149
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yes, i agree. use the Session object.

    a small note though: if your server uses a web garden, you'll have to configure your ASP.NET website to use the StateServer instead of storing sessions InProc.
     
    adbie, Dec 26, 2005 IP
  7. pratik

    pratik Notable Member

    Messages:
    2,305
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #7
    hey there m lokin for an image scroller in my asp.net page something which loks like the one on this page.. http://www.componentart.com/charting/gallery.aspx?control=WinChart ..

    and m also lokin for tutorials on VB.NET in pdf version..

    can u help?
     
    pratik, Dec 26, 2005 IP
  8. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This thread strikes me as almost complete Troll Bait. I feel bad for feeding it, since you aren't contributing elsewhere.

    But, WTH, as long as everyone knows it's Troll Bait :)

    Anyway, I could be absolutely wrong. Can't hurt to ask for help, right? Even if you seem to be completely ignoring the actual forum.

    I'm trying to build an ASP.NET 2.0 website. I'm running up against the following compiler errors:

    One line [65] produces:
    "The server tag is not well formed"
    <td runat="server" id="lblPriceItem<%# DataBinder.Eval(Container.DataItem, "item_id">) %>">Price </td>

    The next error (from line 62) looks like:
    Expression expected.
    Line 62 looks like:
    <td rowspan="3" runat="server"><%# DataBinder.Eval(Container.DataItem, "description") %></td>

    The complaint about line 62 comes from column 99. which is the "<" character in the </td> entity.

    Am I doing something stupid [probably]? Am I missing something obvious? [More likely]. Please, share with us your wisdom. I'd certainly appreciate it.
    (Or anyone else's).

    I'm running across an ugly issue. I'm getting a complaint about the line that goes:

    <td rowspan="3"><%# DataBinder.Eval(Container.DataItem, "description") %></td>
    Code (markup):
    The compiler error is "Expression expected" which explains Oh, so much.
     
    jimrthy, Dec 28, 2005 IP
  9. riz

    riz Peon

    Messages:
    82
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I had been waiting for the person who started this thread to make good on his proclamation. Well, jimrthy, you may be correct in assuming OP’s intentions.

    Let me see if I can explain it:

    Error on line 65 tells me that you are moving from ASP to ASP.NET platform. The id tag needs to be a valid string. You are trying to assign a value dynamically. There are ways to achieve this. You can write the whole <td> tag using <asp:literal>. Also, since you are using <td> as a server control, assign the id value in code behind.

    Error on line 62 is a bit complicated to explain. The DataBinder class exposes the static method Eval which eliminates explicit typecasting. To use this functionality, you must provide the naming container for ‘descrption’.
     
    riz, Jan 11, 2006 IP
  10. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Or maybe not. I see that he's finally gotten around to adding a few other posts to the board.

    Well, yes and no. This is basically a new homework app I assigned myself to teach myself ASP.NET. It's all fresh code.

    I'd already reached the conclusion that the hype about minimal coding was ridiculous. It doesn't seem as though MS has really added much, except more controls and a more rigid programming model.

    It's about what I expected when I first started toying with it. If you want to do anything interesting that MS didn't foresee, you really need to build your infrastructure and custom controls.

    That gives me something to go on, thanks!
     
    jimrthy, Jan 20, 2006 IP