|
ss.mmm wrote: Which is the best way to store a dataset over a page?
Session, Cache or Viewstate?
It depends on how you want to access the dataset.
1 - Session : Can be used if you want to access your dataset in all the pages and it should be user specific. Not recommended if your dataset is huge.
2 - Cache : It will be cached. And if same dataset will be accessible for all users.
3 - ViewState : If you want to get access to the dataset only on single page. Stored as hidden fields in the page. You class should be serializable to keep it in viewstate. I don't think that dataset is serializable.
Hope it helps
--If this post helps you, please vote for it.
|
|
|
|
|
Session (User Level Access)
Storing the Dataset in the session is not at all a good idea. The reason is --- Say you have a dataset containg around 1000 records and you are storing it in a Session Object. Let us consider some 1000 user's logged-in and having access to the same set of Records. Can you Image the load on the Server? In this case, Response from the server will be tramendously slow and User's will experience Response Time out problem for each page Request. Instead of storing it in a session object, we can go and query the Database everytime.
Viewstate (Page Level Access)
when we store anything in the Viewstate, a hidden field will be created in the HTML. Let us take the same example -- say you have a dataset containing arund 1000 records and you are Assigning it to the Viewsate. Run this and view the source of the page. This will increase the page size dramatically. When the Page size is larger It will take much longer time to execute and Load.
ViewState is only used to save the values for the page level access which should be maintained after post backs. It Is recommended and Ideal only to save small values.
Caching (Application Level Access)
If you plan to store a large dataset then Data Caching is the Best way. A copy of Dataset can be cached in the server and whenever any user want to access the same set of Data then it can be fetched from the Cache instead of querying the Database everytime. Having a single copy of Cached Data for all User's doesn't put's much load on the server and This will radically increase the perfromance of the application.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Hi,
Did anybody have experience the same issue? I am using SQLserver session state with trusted connection as shown below:
sessionState mode="SQLServer" sqlConnectionString="data source=MydatabaseServername;integrated security=SSPI" cookieless="false" timeout="5"
and form authentication
<authentication mode="Forms">
<forms loginurl="Login.aspx" name=".ASPXFORMSAUTH">
After I login, I wait until sesssion timeout reachs, like 10 minutes, then click on other pages, I still can access. But if I wait for a much longer time, like 30 minutes, then click on other pages, I was logged out. It looks like the session timeout is still using default value 20 minutes, even though I set it as 5 minutes. But I couldn't confirm it. Does anyone have any ideas on it?
Thanks in advance!
|
|
|
|
|
vicky457 wrote: I was logged out. It looks like the session timeout is still using default value 20 minutes, even though I set it as 5 minutes. But I couldn't confirm it. Does anyone have any ideas on it?
Not clearly, but try with setting the session timeout in Session_Start event on global.asax file.
|
|
|
|
|
I want to create a namespace. I don't know how to do it. I add a class in
my project. Should I add keyword namespace myNmaspace to it. or how can I do
it.
I want three files
myNmaespace.fileA
myNmaespace.fileB
myNmaespace.fileC
Where fileA.ca, fileB.cs,fileC.cs are my Classfiles.
seema
|
|
|
|
|
yp.
it like this:
namespace myNmaspace
{
}
And of course you can use same namespace on more than one file. You have to repeat it for every file you want to do it.
|
|
|
|
|
Hi there...
I'm facing an issue very annoying. I'm developing an ERP in ASP.net using 3 tier technic. The ERP has a lot of modules, so we create 3 solutions for every module. Business Logic Layer, Data Access Layer and Presentation Layer. We cannot create 1 solution for each module because the modules are connected . So is a pain in the ass when I have to debug a layer that isn't the presentation layer! Then I ask:
- Is there a way to debug DLL solutions?
- if not, how is the best way to test my application?
Thanks a lot!
|
|
|
|
|
I don't get it, why do you use 3 solution.
you could use 1 solution with 3 projects and when you have specificied a Reference, you could use break point in different project.
If that isn't what you wanted, then open as many instances of visual studio and load each solution, then in each instances, go to debug menu and "attach process": WebDev.WebServer.EXE. And it will stop on breakpoint in instances of your visual studio.
I hope you understand, what i am trying to type.
|
|
|
|
|
I did a little search, you can use any instances for debugging, but only one instances can be attached to WebDev.WebServer.exe.
I still suggesting to use only one solution, with multiple projects. Thus you will have debugging access to the project, that builds a Dll.
|
|
|
|
|
Hi You cannot debug a dll. Instead try to find the Project FIles for that dll (source code) and then attach the source code to your existing project, Delete the existing dlls from the references and then refer the added project to your existing project.
Start Debugging Now
Note : dll is a very secured format which has all the underlying logic of the application. dlls are created to be secure and to be used without having access to the source code. You cannot get into the source code of the dll.
HAppy Coding
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
Hi
i am currently doing a project on miedical diagnosis tt require the application to be able to perform some inferences based on the user input.
however i am not sure how i can go abt doing it?
is neural network the right path to go?
if so, how/where to i start from
is there any free neural network s/w available , so tt i can link up with my website to perform the inferences?
|
|
|
|
|
HI, i am have this grid view, and i have a ds binding a repeater. i want to filter the select command depending on the seleccion in the gridview, i have this code, but i can't make work right.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EventId"<br />
DataSourceID="SqlDataSource1" SelectedIndex="1"><br />
<Columns><br />
<asp:CommandField ShowSelectButton="True" /><br />
<asp:BoundField DataField="EventId" HeaderText="EventId" InsertVisible="False" ReadOnly="True"<br />
SortExpression="EventId" /><br />
<asp:BoundField DataField="EventName" HeaderText="EventName" SortExpression="EventName" /><br />
<asp:BoundField DataField="EvenThun" HeaderText="EvenThun" SortExpression="EvenThun" /><br />
</Columns><br />
</asp:GridView><br />
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:vpx_newConnectionString %>"<br />
SelectCommand="SELECT * FROM [Events]"></asp:SqlDataSource> <br />
<br />
Sub BindData()<br />
'Read sample item info from XML document into a DataSet<br />
Dim cnn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("vpx_newConnectionString").ToString)<br />
cnn.Open()<br />
Dim cmd As SqlDataAdapter = New SqlDataAdapter("select * from mediaphotos Where EventID =" & GridView1.SelectedValue, cnn)<br />
<br />
Dim ds As New DataSet()<br />
cmd.Fill(ds)<br />
<br />
' Populate the repeater control with the Items DataSet<br />
Dim dsPaged As New PagedDataSource()<br />
dsPaged.DataSource = ds.Tables(0).DefaultView<br />
dsPaged.AllowPaging = True<br />
dsPaged.PageSize = 5<br />
<br />
dsPaged.CurrentPageIndex = CurrentPage<br />
<br />
'Disable Prev or Next buttons if necessary<br />
cmdPrev.Enabled = Not dsPaged.IsFirstPage<br />
cmdNext.Enabled = Not dsPaged.IsLastPage<br />
<br />
rptParts.DataSource = dsPaged<br />
rptParts.DataBind()
can someone help me here, what i am doing wrong
|
|
|
|
|
Hi guys,
How can i add numbering with a checkboxlist control that is depending on the total number of items checboxlist has in it. For instance,
1[]Book1
2[]Book2
3[]Book3
By default I can add items to the checklist but i there is no way to display numbers on the left side.
I would appreciate anyinput.Thanks in advance.
|
|
|
|
|
netJP12L wrote: i there is no way to display numbers on the left side.
No there is no predefined way d\to do this. You can do this by using DataGrid/GridView instead of Checkbox list. In datagrid/gridview first bound columns should be index columns which shows current row index. Next columns will be your checkbox. To get the checked status, loop through entire grid and find the checkboxes.
|
|
|
|
|
Hi,
I have a datagrid,which has template columns and bound columns <b>dynamically</b> built. Now i need to have two header rows. The first header row spanning over certain number of columns( should be dynamic).
Both the header row text will be from database.
Want something like this.
1.1 & 2.2 are spanning over 4(Not fixed) columns(A R S X).
Blue, red,green ,yellow is in the first column. There are 9 column and 2 rows in the below shown example. I need 2 headers and number of columns vary.
1.1 1.2
A R S X A R S X
Blue
RED
GREEN
Yellow
I would like to do this with a datagrid, but if you have any other suggestion to achieve this, let me know.
Thanks,
kavi
|
|
|
|
|
kavishan wrote: I would like to do this with a datagrid,
Use only template columns and create a table which looks like your requirement.
|
|
|
|
|
Hi Navaneeth,
Thanks for your reply.
using template columns would provide only one header row. how would i get two header rows.
Thanks,
kavi
|
|
|
|
|
Hey there,
i have some problems and i've spent 3 days trying to solve it, so now i bow down and asks you guys.
I have a repeater that repeats data, duh, in this repeater i have a datagrid, listing data based on the title of the repeater. all this works perfectly fine.
problem is.
In the gridview... not datagrid, gridview, i have textboxes for each row.
This is to get the quantity of the item.
Im looking for a solution that either adds the textbox in that row to a database or at the bottom of the site, adds ALL the content of the textboxes to a database.
is this specific enough?
thanks,
Christian
|
|
|
|
|
|
hey guys and girls how can I read aspx output as html?
thx
BiG RaLpH
|
|
|
|
|
I'm not sure what you mean.
Do you want to make a request for an aspx page and retrieve the HTML response? If so, have a look at the WebRequest[^] class.
Paul
|
|
|
|
|
Hi All,
can anyone suggest me, how can i read a file whaich has .properties extension in ASP.Net 2.0
|
|
|
|
|
Read it where, and for what purpose ? A StreamReader can read any file, and an XmlDocument can read any XML doc, which I believe that is.
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 )
|
|
|
|
|
I want to read a file which has configuration related data, currently we are doing it through XML but now i want to read it from file which .properties extension for example i want to read log_level="Error" from properties file
|
|
|
|
|
I have an option to upload image files in my website.But after uploading the website I am getting some problems.Whenever I am trying to upload an image,all the time it is asking the FTP username and password.What is the solution to this problem?
ARINDAM
|
|
|
|