|
True. It's a wonderful feeling.
Best wishes,
Navaneeth
|
|
|
|
|
Analyse the data what you can put in Cache or in Session.If there is some global data that is common for all users,put it in Cache and put Data which is specific to user those put it in Session only.It will improve the performance.
When passing IDs through URL,encode it and decode it at the recieving end and validate it.
Cheers!!
Brij
|
|
|
|
|
Brij wrote: When passing IDs through URL,encode it and decode it at the recieving end and validate it.
Can you define encode/decode in its simplest form please
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Encode: means you are changing the actual value to different value using some pattern/value
Decode: means get the actual value from the encoded value.(You can get the actual value because you have the pattern/formula for encoding but no other person can get the actual value).
Cheers!!
Brij
|
|
|
|
|
Session is good if there is less data. As Session creates separately for each user. In your case this is fine if you are going to store few field in session.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I don't know what the recommended way to do this is but I have recently had the need to cloak values not so much in post backs but in page rendering.
For example I do not want anyone viewing the page source to see the id's of rendered components like buttons, divs etc and what to send back in the OnClientClick event.
What I have done is to generate GUID's and assign them to the ID of the web control, these are then checked against an array of the generated GUID's, responding to a button click returns a second GUID which is the matched to assigned web control in the array, this method completely masks the original value, in your case the client ID.
Note: Each time the page is loaded a new set of GUID's are generated..
I don't know if it can work for you but I think it might.
theLizard
|
|
|
|
|
Hi,
How can I filter two different datatables in a single datatable?
like consider I have following two datatables
DataTable A DataTable B
PID | CID CID | FID
1 | 1 1 | 1
2 | 2 4 | 8
4 | 16 16 | 32
So after filtering I can have a output like
DataTable C
PID | FID
1 | 1
4 | 32
So in my filtered dattable I can have only matching results of datatable A and Datatable C?
How can I do this using .Net datatable?
Rock Star
|
|
|
|
|
This isn't an ASP.NET question, its a database question. You're best bet would be to construct the query to return the results appropriately.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I think he is asking to manipulate Application end DataTable, not Database tables.
|
|
|
|
|
I realize he is asking for that but it would be more effecient to do it at the database level.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Ok... No big deal buddy..
|
|
|
|
|
You need to recreate the new DataTable.
Create Column using
<br />
DataTable.Columns.Add(new DataColumn()
To add a column
To add a new Row use
DataTable.NewRow()
then add the row as
DataTable.Rows.Add
|
|
|
|
|
But I want only matching column of datatable A and datatable B in datatable C
How can I do that?
Rock Star
|
|
|
|
|
Copy all DataTable to arrays, manipulate or filtering and create new DataTable
|
|
|
|
|
I was thinking of using select method. Is there any example for selecting data from two different datatables?
Rock Star
|
|
|
|
|
If you are using dotNetFramework 3.5 using Linq would be the easiest way
|
|
|
|
|
Use the SQL sentence:
SELECT A.PID,B.FID FROM A,B WHERE A.CID=B.CID,
write it in Visual Studio or Procedure
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:53am.
|
|
|
|
|
???Do you want to get a datatable??
StringBuilder strSQL= new StringBuilder("select A.* from A a inner join B on A.CID = B.CID");
SqlCommand cmd = new SqlCommand(strSQL.ToString(), conn, transaction);
DataTable C= new DataTable();
C.Load(cmd.ExecuteReader(), LoadOption.Upsert);
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:53am.
|
|
|
|
|
hi sir,
please help me.i am new in asp.net.
sir when i am using my web application on web it goes to log out suddenly.while it is working fine locally.
please suggest me what can be the issue.
and one more question sir my web application is very slow on web.but it working fast locally.
|
|
|
|
|
vikas shukla wrote: log out suddenly
Things don't happen suddenly and mysteriously, there is a cause of the action. Without knowing anything about your project, how it is coded, what you are doing, it is impossible to give any specific advice.
The speed difference can be attributed to the speed of your internet connection, the amount of data that is being transmitted, load on the server, and potentially several other factors
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi , I am using the following code to show the video stream in an image tag in aspx page.
It is working well in the firefox by showing the updated image from camera but it is not working
for Interner Explorer the image is not refreshed in the Internet Explorer what is the problem and how can it be resolved .The url for the image remains the same.
The code is :-
<title>
<asp:scriptmanager runat="server" enablepartialrendering="true" asyncpostbacktimeout="180">
<asp:timer id="timer" runat="server" interval="2" ontick="timer_Tick">
<asp:updatepanel id="upImage" runat="server" updatemode="Always">
<triggers>
<asp:asyncpostbacktrigger controlid="timer" eventname="Tick">
<contenttemplate>
<asp:image id="animatedImage" imageurl="http://IP Address of Camera/img/video.mjpeg" runat="server">
<asp:label id="test" runat="server">
|
|
|
|
|
Hi,
Am converting dataset to excel on button_Click using the below described code,
string attachment = "attachment; filename=Employee.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter stw = new StringWriter();
HtmlTextWriter htextw = new HtmlTextWriter(stw);
gvEmployee.RenderControl(htextw);
Response.Write(stw.ToString());
Response.End();
, after excel gets downloaded none of the other events get activated unless the page is refreshed.
How to download the excel in the same page retaining the controls in that page.
beula.
|
|
|
|
|
Hi,
with GemBox.Spreadsheet Excel C# library you can easily convert DataSet to Excel and stream it to browser.
Here is a code snippet how to do it:
var ef = new ExcelFile();
foreach (var dataTable in dataSet.Tables)
{
var ws = ef.Worksheets.Add(dataTable.TableName);
ws.InsertDataTable(dataTable, "A1", true);
}
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=Employee.xls");
ef.SaveXls(Response.OutputStream);
Response.End();
|
|
|
|
|
Wich dataaccess metod is faster - with datareader when the data is return from stored procedures or with LINQ.
What is the difference if is working with milions of records in a table?
Thanks for your answers!
|
|
|
|
|