|
what the properties will do timeout & Duration
also How to keep the session always without expiring
Thanks in Advance
-
|
|
|
|
|
How can I get if the File download was successful or not.
I m simply using -
Response.Redirect(url)
The file download dialog box contains Save, Cancel.
How could I know that User clicked Cancel?
Is there any workaround?
I hv also tried
Response.Clear()<br />
Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)<br />
Response.AddHeader("Content-Length", file.Length.ToString())<br />
Response.ContentType = "application/octet-stream"<br />
Response.WriteFile(file.FullName)<br />
Response.End 'if file does not exist
But how could i get the Result of Download operation?
"If our Mind can, the Program can !!"
|
|
|
|
|
I'm trying to configure log4net to work in my web project in visual studio 2005. I tried to follow most the configuration example in the web but my project don't have assembly.cs file, so where should i tell the application to read my log4net configuration.
I put the config in the default web.config, and try to create the log in ExampleLog.log, but the log never appear. How can I tell the application to parse my config. I try putting log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("web.config") in Global.asax, not working too.
<configsections>
<log4net debug="true">
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="ExampleLog.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param date="datePattern" value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%-5p %d %5rms %22.22c{1} %-18.18M - %m%n" />
<root>
<level value="ALL">
<appender-ref ref="RollingFileAppender">
Regards,
Jia
|
|
|
|
|
I'm using asp.net 2.0 and sql server 2000. I'm using a transaction to wrap the execution of 2 insert commands on the sql server together. On the development system everything works fine. On the target system it executes the 2 inserts properly but then displays the error message:
Sqltransaction is finished and cannot be used anymore
the stack:
System.Data.SqlClient.SqlTransaction.ZombieCheck() +701167
System.Data.SqlClient.SqlTransaction.Rollback() +120
kurz.GV1_RowCommand(Object sender, GridViewCommandEventArgs e) +2901
System.Web.UI.WebControls.GridView.OnRowCommand(GridViewCommandEventArgs e) +104
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +76
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +200
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5612
does it try to make a rollback? but the things are inserted properly.
And then it makes the funny Zombiecheck and maybe found one.
Did anybody solve a similar issue? Thanks in advance. Wilfried.
|
|
|
|
|
It will be much more helpful if you can post some sample code of transaction what you wrote and the data you inserted..
|
|
|
|
|
ok thats the code: I execute it in the gridview_RowCommand()
and on the development system everything is great.
sqlKont = "Update tbnKontBib set fest=fest+ CONVERT( money," & "'" & Komma2Punkt(diffFest) & "') " & _
"where bh='" & Session("bHalle") & "'"
sql = "Insert into tbOrder(artnr, odatum, bh, oanz, opreis, bhoper) Values( " & _
"'" & artnum & "'" & "," & _
"'" & Date.Now.ToShortDateString & "'" & "," & _
"'" & Session("bHalle") & "'" & "," & _
"'" & anzBest & "'" & "," & _
"CONVERT( money," & "'" & Komma2Punkt(preis) & "')" & "," & _
"'" & Session("bUser") & "')"
'Ausfuehrung mit Transaction
Try
t = conn.BeginTransaction
cmd = New SqlCommand(sqlKont, conn)
cmd.Transaction = t
erg = cmd.ExecuteNonQuery()
If erg <> 1 Then 'Fehler
MsgBox("K-Fehler in Bestellung! Bitte Administrator benachrichtigen!", MsgBoxStyle.Critical, "!!! Achtung !!!")
t.Rollback()
GoTo ende
End If
cmd = New SqlCommand(sql, conn)
cmd.Transaction = t
erg = cmd.ExecuteNonQuery()
If erg <> 1 Then 'Fehler
MsgBox("O-Fehler in Bestellung! Bitte Administrator benachrichtigen!", MsgBoxStyle.Critical, "!!! Achtung !!!")
t.Rollback()
GoTo ende
End If
t.Commit()
MsgBox("Ihre Bestellung wurde ausgeführt!", MsgBoxStyle.Exclamation, "Bestellvorgang")
Catch ex As Exception
t.Rollback()
MsgBox("Ihre Bestellung ist fehlgeschlagen! Bitte wiederholen sie die Bestellung.", MsgBoxStyle.Critical, "Bestellvorgang")
End Try
ende: conn.Close()
Bye Wilfried
|
|
|
|
|
|
Ok I'll use parameters later, but if you could give me a hint to my problem it would be a great help.
Thanks Wilfried.
|
|
|
|
|
Ok I solved that, the MsgBox() calls were the reason. When I pulled them out it works well on the targhet system
|
|
|
|
|
hi,
I have a grid view which i am creating dynamically in the code behind with hyperlink fields.on click of each hyperlink field i have to open up a new pop window using javascript and passing multiple parameters. I am doing something like this. But the problem is in my page, the value of the parameters that i am getting is {0} and {1} instead of their actual values. Any solutions how i can go about this?
bfield.DataTextField = DataCol.ColumnName
bfield.HeaderText = DataCol.ColumnName
bfield.DataNavigateUrlFields = crfields
bfield.DataNavigateUrlFormatString = "javascript:void(window.open('mypage.aspx?my_id={0}&name={1}',"",'width=270,height=300,top=200,left=200'));"
|
|
|
|
|
hi
i want to implement delay at server side for a function can you say how can i do that.Do i need to use a control for that.or can it just be done with code...if anyone know a code to create a delay pls say
any suggestions or links are welcome..
thanks in advance
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
MSDN[^]
This article will help you.
Regards,
Satips.
|
|
|
|
|
User System.Threading.Thread class.
for example, If u want to dalay for 5 seconds at server side then,
System.Threading.Thread.Sleep(5000);
where argument is in miliseconds.
Cheers.
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
plz send me the C# code for update in gridview in ASP.net 2005
Rhydo
|
|
|
|
|
What you have tried so for in updating it in gridview>
whay error it shows?
Regards,
Satips.
|
|
|
|
|
I tried to edit,update the fields by adding textbbox with in the grid view.
but the error was "Index was out of range.must be non negetive and less than the size of the collection.parameter name:index"
Error was in line
cmd.Parameters["@name"].Value=GridView1.DataKeys[(int)e.Item.ItemIndex];
Rhydo
|
|
|
|
|
Rhydo wrote: cmd.Parameters["@name"].Value=GridView1.DataKeys[(int)e.Item.ItemIndex];
Try it as
cmd.Parameters["@name",SqlDbType.VarChar,128].Value = GridView1.DataKeys[(int)e.Item.ItemIndex];
Regards,
Satips.
|
|
|
|
|
Plz send me the code for chat in C#.net 2005 and VB.net2005
Rhydo
|
|
|
|
|
Do you need us to do your work for chat application.
Regards,
Satips.
|
|
|
|
|
|
How much you pay for me to develop the chat application.
Regards,
Satips.
|
|
|
|
|
begin to develop by yourself and use help
I Love SQL
|
|
|
|
|
how to accept only characters in chartxtbox and only numbers in numtxtbox using asp.net?
|
|
|
|
|
http://www.codeproject.com/script/comments/forums.asp?msg=1989172&forumid=12076&mode=all&userid=3585246#xx1989172xx
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
How we can create a news slider like (in www.bseindia.com -> announeces section)
So any one knows abt my query then urgent reply me
...
shah
|
|
|
|