|
You really should not do this.
The session data is stored on the server (only the session ID is passed back and forth between client and server as a cookie - the server can then use this ID to retrieve the relevant session data.)
You should only ever store small amounts of data in your session object - imagne the server resources consumed if you have, say, 100 sessions at once... imagine 1,000 sessions.... imagine your server siezing up...
Fred
|
|
|
|
|
thank all reply to me
i could understand is
if i have datatable (dt) contain 100 rows
and i assign session["demo"] = dt;
Data in Session["demo"] mean is 100 rows data have store in server and client will have session id of itseft on server
when client request to server on the server will check session id on client with session id on server and then assgin data by session store on server;
ex: datatable dt1 = (datatable)session["demo"];
but i dont know if data of session store on server so where is it store ???
|
|
|
|
|
Yes, the session data is stored on the server. Part of that data is a unique SessionID which is assigned by the server at the start of each new session. This (and only this) is stored on both the server and the client - though only temporarily in the form of a non-persistent cookie - and is passed back and forth between the two. This allows the server to know which session it is dealing with each time a page request comes in, and to serve up the rest of the apprpriate session data (eg your datatable)
I would stress again though that you really should not get in the practice of storing such large amounts of data in your session object. You might get away witrh it for really small sites (ie sites with very few hits, or users) but if/when your site gets busy you are asking for trouble. Try to find an alternatiove solution.
Fred
|
|
|
|
|
AnhTin wrote: And where is position data store ??
What do you mean by position data store?
|
|
|
|
|
Never use Session in this way
So Session is for storing the data that is required during the post back or between pages and it stored at the server side
So don't assign datatable value to Session
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Session is always stored on the server. The SessionID is the key in identifying a particular user session.
|
|
|
|
|
I have a gridview that is populated via a datatable. What I am wanting to do is take the raw data from the datatable and create a set of bound columns and populate those columns with the values in the datatable. my code currently is as follows.
<br />
Dim datValTable As DataTable<br />
<br />
' Create a dataTable to populate with the data Returned from the select statement.<br />
Dim datTable As DataTable<br />
datTable = New DataTable("ViewTable")<br />
<br />
datTable = PopulateDrillDown(datTable)<br />
GridView1.DataSource = datTable<br />
GridView1.DataBind()<br />
GridView1.Columns.Clear()<br />
<br />
Dim bFld As BoundField = Nothing<br />
bFld = New BoundField()<br />
bFld.DataField = "view_id"<br />
bFld.HeaderText = "ViewID"<br />
GridView1.Columns.Add(bFld)<br />
<br />
GridView1.DataBind()
This adds the ViewID column to all the columns from the datatable. which is obv not what i want. I need to be able to create a subset of columns from the datatable and populate my gridview with that. Can anyone point me in the right direction. Do i need to create a new datatable and populate that then bind on the gridview?
Cheers
Ian
|
|
|
|
|
Why not just return the columns you want in the first place?
However, if you insist... you could either set the appropriate columns' width to zero, or else create a dataview with the columns you want out of the datatable and simply bind the datatable to that - there is no need to bind it to the datatable at all.
Fred
|
|
|
|
|
Hi developers
I need to generate an RSS Feed like: http://www.carmagazine.co.uk/car.rss[^]. With options like Searching, Sorting etc... Any idea about this???
Furthermore how to read above RSS Feed in the same way with Searching and Sorting features. Also how to customize display of such feeds???
Thanks for your time
|
|
|
|
|
Its not that bad: Sorting / Searching comes inbuilt with it.
public XmlTextWriter CreateRSSFeed(XmlTextWriter writer)
{
DataTable articleTable = (DataTable)Session[Keys.ARTICLE_TABLE];
RSSService rssService = new RSSService();
writer = rssService.WriteRSSPrologue(writer);
foreach(DataRow articleRow in articleTable.Rows)
{
string articleID = articleRow["ArticleID"].ToString();
string title = articleRow["Title"].ToString();
string byLine = articleRow["ByLine"].ToString();
DateTime releaseDate = DateTime.Parse(articleRow["ReleaseDate"].ToString());
string articleLink = ConfigurationSettings.AppSettings[READ_ARTICLE_LINK];
articleLink = string.Format(articleLink,articleID);
writer = rssService.AddRSSItem(writer,title,articleLink,byLine,releaseDate);
}
writer = rssService.WriteRSSClosing(writer);
return writer;
}
public XmlTextWriter AddRSSItem(XmlTextWriter writer, string itemTitle, string itemLink, string itemByLine, DateTime releaseDate)
{
writer.WriteStartElement("item");
writer.WriteElementString("title",itemTitle);
writer.WriteElementString("link",itemLink);
writer.WriteElementString("description",itemByLine);
writer.WriteElementString("copyright","My Company");
writer.WriteElementString("pubDate",
releaseDate.ToString("r"));
writer.WriteEndElement();
return writer;
}
Hope this helps
|
|
|
|
|
To Display the RSS feed you need Feed reader. Its inbuilt in internet explorer 7.0.
Customization!! that will be a trick, will have to do google intensly.
|
|
|
|
|
Hi all,
I am displaying a report on my web applicatio using a crystal report viewer . when i try to export it it shows me another popup to select the type it shows only (i wanna export to excel) excel 97 to 2000. anyway when i select it and click ok it does not export the report.
it gives "System.FormatException: Input string was not in a correct format."
please tell me what is wrong.
Regrds
Ruwandi
rkherath
|
|
|
|
|
Hello to every One,
i'm using custom validator to check the textBox1 field and i'm also using the rang and required validator field for another textBox2..
Now when i click the button then all the rest field r being correct the custom validator feild doesnot show the error... nor it is shown in summary validator...
could u suggest me how should any one can change custom validator to client side validation....
Private Sub CustomValidator1_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
Dim i As Date
If Convert.ToDateTime(args.Value) > "12/2/2007" Then
args.IsValid = True
Else
args.IsValid = False
End If
End Sub
Plz mark the underline event can i change this to client validate and if yes how...?
Suggest me....
Thank You
|
|
|
|
|
yes you can change it to client side.
in your custom validator there is client side function where you can pass the function name.
You can find this in any book of asp.net
|
|
|
|
|
i am having 3 colums...In Mozilla i am getting Large spaces between each column..But in IE i am getting that correctly
I am getting the data to the html table dynamically from code..even the column names..
Pls tell me how to solve the problem
Goutham
|
|
|
|
|
A sample of the HTML / CSS might would be useful
|
|
|
|
|
If the rendering differs between browsers, it's almost always Mozilla that renders it correctly and Internet Explorer that doesn't. I have only ever seen one single occation where the opposite was true.
You have built your page to depend on some rendering bug in IE, so it will not render as intended in any other browser.
---
single minded; short sighted; long gone;
|
|
|
|
|
hai
iam stranger in AJAX.plz tell me how can i learn AJAX in beginer stage.iam in zero level.plz give me any link or text book name.
-- modified at 3:25 Tuesday 26th June, 2007
|
|
|
|
|
Begining ajax with asp.net -- works
very good book
|
|
|
|
|
|
|
What is zero level ? Have you done any web development at all ? Do you know javascript ?
If you want to have AJAX on your site, but not understand how it works, use the ASP.NET AJAX library. If you want to learn AJAX, go for 'AJAX in Action', a Manning book which will teach you how to write AJAX code.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hi All
Does anyone know the procedure to Open edit and Save office documents in an Asp.Net application. What I am trying to ask is....
Suppose there is an application in which after you login you can view files and folders stored on a particular server...I have done all the things such as Creating new folder, Cut copy paste delete rename, Upload and Download. But I have do one more thing. That is to edit the office files. When the user clicks on any office document, it will ask to open or download. The user has to open it and the appklication will open in Word only. I have done till this. After that the user can edit the file and can save the same at the server directly which I can't able to do. If anyone had done this before then please let me know. Its very urgent. Any help will be appriciated......
Sagar Pattnayak
Software Developer
Sun-Dew Solutions
+91-9831169962
|
|
|
|
|
SKP24 wrote: After that the user can edit the file and can save the same at the server directly
In this scenario, the document edited is a local copy, and by no means the changes would not reflect into Server Copy from MS Word.
Why dont you make user to upload the document and check if the earlier version exists?
|
|
|
|