Stardoll - Car Insurance - Flights - Flights - Internet Advertising

PDA

View Full Version : Help You in ASP.NET !


Mohammed Elnahrawi
Dec 1st 2005, 11:01 pm
Hi all ,

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

Thanks

Mohammed

aworldh
Dec 3rd 2005, 1:19 am
Hi all ,

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

Thanks

Mohammed


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.

riz
Dec 3rd 2005, 8:43 am
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();
}

Mohammed Elnahrawi
Dec 3rd 2005, 11:00 pm
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

There are certain cases where holding a state value in ViewState is not the best option. The most commonly used alternative is Session state, which is generally better suited for:

* Large amounts of data.
As ViewState increases the size of both the HTML page sent to the browser and the size of form posted back, it's a poor choice for storing large amounts of data.
* Sensitive data that is not already displayed in the UI.
While the ViewState data is encoded and may optionally be encrypted, your data is most secure if it is never sent to the client. So, Session state is a more secure option.
* Objects not readily serialized into ViewState, for example, DataSet.
As already discussed the ViewState serializer is optimized for a small set of common object types. Other types that are serializable may be persisted in ViewState, but are slower and can generate a very large ViewState.

Mohammed

aworldh
Dec 4th 2005, 10:28 am
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

Yeah, session state is the best option.
Thanks and welcome to DP.

adbie
Dec 26th 2005, 11:39 pm
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.

pratik
Dec 26th 2005, 11:43 pm
Hi all ,

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

Thanks

Mohammed

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?

jimrthy
Dec 28th 2005, 10:06 pm
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>

The compiler error is "Expression expected" which explains Oh, so much.

riz
Jan 11th 2006, 7:34 am
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’.

jimrthy
Jan 20th 2006, 4:03 pm
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.

Or maybe not. I see that he's finally gotten around to adding a few other posts to the board.

Let me see if I can explain it:

Error on line 65 tells me that you are moving from ASP to ASP.NET platform.


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

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.

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.

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’.

That gives me something to go on, thanks!