|
Change the session timeout in the web.config.
<system.web>
<sessionstate mode="InProc" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="60">
Specifies the number of minutes a session can be idle before it is abandoned. The default is 20.
|
|
|
|
|
use javascript, search google for javascript timer and when time passed just submit form back to server
Pilo
|
|
|
|
|
Hows it is possible to tell when rows in SQL database have been updated by the update command?
My page does need to know if the row is now renewed with the data, and how many rows was updated.
Your help is needs must.
|
|
|
|
|
|
I read this but it does not make clear to me.
|
|
|
|
|
If you are using 2.0 look at SqlDependency or SqlCacheDependency
only two letters away from being an asset
|
|
|
|
|
Perhaps i not make myself clear.
I code the SqlConnection with Update command manually and update the record. Inot use any DataSet or others. When i run Update it update the informations.
This is good.
But how do i see how many rows records have been updated?
Please your help for i read the dependencies infos but not mean anything to me. This is not right for my problem i think.
Thank
|
|
|
|
|
ExecuteNonQuery
"For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1."
only two letters away from being an asset
|
|
|
|
|
Many Thank For Answer.
My question is how do i find this information to make us of please?
I know not how i get this return value from Insert statement.
|
|
|
|
|
marconi Flangepants wrote: how do i find this information
Microsoft is very clever, they keep this stuff hidden very securely on a public site called MSDN[^]. Perhaps you've heard it mentioned a few million times in these forums.
only two letters away from being an asset
|
|
|
|
|
Is my question make angry?
Sorry that my brain does not knows these things yet.
|
|
|
|
|
I don't see a problem... I suppose you use SqlCommand to run your UPDATE statement, right? And SqlCommand.ExecuteNonQuery method returns you number of affected rows...
Or do I not understand what you mean?
Pilo
|
|
|
|
|
Yes,
I do like this
<code>SqlConnection6.ConnectionString = "connstring goes here";
string sql = "update string goes here";
SqlCommand cmd = new SqlCommand(sql, SqlConnection6);
SqlConnection6.Open();
cmd.ExecuteNonQuery();
SqlConnection6.Close();</code>
So how from this must i get number of rows please?
|
|
|
|
|
int rowsAffected = cmd.ExecuteNonQuery();
we call it return value
Pilo
|
|
|
|
|
Hi,
I would like to ask you what is the best way to localize applications in .NET 2.0 and
how Microsoft do it in Vista?
Wojtek
|
|
|
|
|
|
Hi..
I have two asp:ListBox tag in a select.aspx page. Then users select items from first asp:ListBox push a simple button to pass them to a second asp:ListBox. I made pass action by using javascript and dhtml. When the page is posted by an asp button, always the socond box comes emtyp so I could not get selected items. Why aspx do not get control filled by javacript.
karanba
|
|
|
|
|
It's to do with viewstate AFAIK - javascript makes no changes to it, and so when you post back, as far as vs is concerned, nothing has changed.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hey guys, i am stuck in my project. I want to get a selected row value without having checkboxes or select button display on gridview. Can somebody tell me how can i get the selected row value which user click on the gridview please.
|
|
|
|
|
on GridView1_SelectedIndexChanged event
write this code
GridView1.SelectedRow.Cells[0].Text
gives you first cell's text of selected row from gridview
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
|
HI All
i want to read data from Excel sheet using Com object i have code but tht problem is of getting values as string from the cells see the code
_appClass=new ApplicationClass();
_workbook=_appClass.Workbooks.Open(
exceelSheetNamePath,
Type.Missing, Type.Missing,Type.Missing, Type.Missing,
Type.Missing, Type.Missing,Type.Missing, Type.Missing,
Type.Missing, Type.Missing,Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
Excel.Sheets _sheets =_workbook.Application.Worksheets;
Excel.Worksheet _rateConsumer=(Excel.Worksheet)_sheets.get_Item("Retail Consumer");
Excel.Range range = _rateConsumer.get_Range("K38", "L42");
System.Array myvalues;
myvalues=(System.Array)range.Value2;
Problem is that Converting from Array to string can you provide method or more easy way to gets values from Excel i am using VS 2003
|
|
|
|
|
Hi!
Is it possible to let the user enter some data in a textfield/textarea inside a report viewer. I want to generate a report and then let the user feed it with some text before printing, for example.
/Jonas
|
|
|
|
|
I don't think it is possible with pure ReportViewer (however, you can probably create user controls to embed into report, but it's lots of work).
To achieve functionality you want, you can use report parameters. Prompt will be not in report area, but on the top of ReportViewer control.
Pilo
|
|
|
|
|
Thanks, I'll try the later approach!
/Jonas
|
|
|
|