|
Hey guys i have a little problem to be needed to solve..
I have a accessdatasource and dropdownlist and i binded them to eachother. After i change the selected index on dropdownlist,after postback the selected index wont come as i choose. The first index is coming as a default selected index after every postback...
what should i do to pass over it?
|
|
|
|
|
I hope you have given datasource to dropdown in
----------------------------------
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
dropdown.datasource=dc;
dropdown.databind;
dropdown.datatextfield=dtf;
dropdown.datavaluefield=dvf;
}
}
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
|
I did but the problem is still appearing ... and there is another way besides coding ?
|
|
|
|
|
Thanks it seems gonna work
|
|
|
|
|
|
Paste your code we will check it out and tell.
Regards,
Satips.
|
|
|
|
|
need a guide on how an event in asp.net 2.0 can play .mp3 or other media file
thanks for your help
t.aransiola
|
|
|
|
|
You need to embed windows media player in your web page. There's no ASP.NET code to do this, as ASP.NET all runs on the server. You need to generate HTML that embeds the control in your page, and plays your file. Obviously, you can do it in ASP.NET, but ASP.NET won't be doing it in any platform dependant way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Is there any way to optimize GIF Image without using GIFBOT or third party??
|
|
|
|
|
What is an optimised GIF ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
You know that it's really bad manners to start a new thread about something that you've posted on recently. If the answer below wasn't satisfactory then you should have continued on that post.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
drm protected file play in wmp11 player, if the individulization set at 2.2, then go for security upgrade, after successfully upgrading security component, go for accuiring license, but play button not enabled, License cannot albe to store on consumer machin.
Thanks
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Is it right, that the MsgBox() function from asp.net 2.0 cannot be used to show a messageBox in the browser? It only works well on development systems, where server and browser are on the same system? If yes: sorry for my naivity. , )
Plz treat this post seriously.
PS. I know how to display on the browser, but I thought MsgBox() does this functionality for us per hidden script, like viewstate for example.
|
|
|
|
|
wilf57 wrote: MsgBox() function from asp.net 2.0
There is no such thing. MsgBox is a hangover from VB6, in VB.NET, in WinForms. It has nothing to do with ASP.NET.
wilf57 wrote: It only works well on development systems, where server and browser are on the same system?
Correct, because it runs on the server. You can't do stuff like that in C# or VB.NET and have them appear on the client. You need instead to use the alert function, which is a javascript API and thus can run on the client ( so you need to inject javascript into your page, so it appears on the client )
wilf57 wrote: but I thought MsgBox() does this functionality for us per hidden script
No.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
How To Optimize Gif Images ???
|
|
|
|
|
You can use GIFBOT, which will Speed Up Your Pages Without Losing Image Quality!
It is a free Software i used it.
Regards,
Satips.
|
|
|
|
|
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.
|
|
|
|