|
I agree to your point. Save button click will save the data and browser close button click will close the browser window. in this case there is no way to stop the procedure execution or rollback the transaction.
Regards John
|
|
|
|
|
The idea could be to use the transaction from the page itself for eg:
SqlCommand cmd;
try
{
SqlConnection con = new SqlConnection();
con.Open();
con.BeginTransaction();
cmd = new SqlCommand("Update bla bla bla");
cmd.ExecuteNonQuery();
cmd.Transaction.Commit();
}
catch (Exception excp)
{
cmd.Transaction.Rollback();
}
In theory this should work. Please let me know if it helps.
Thank you
Laddie
|
|
|
|
|
hi everyone,
I have used css in my datagrid
For headers:
COLOR: BLACK;
FONT-SIZE: 13px;
FONT-FAMILY:Arial;
FONT-WEIGHT: bold;
TEXT-ALIGN:left;
HEIGHT: 30px;
TEXT-INDENT: 6px;
BORDER-COLOR:Black;
HEIGHT: 20px;
position:relative;
top:expression(this.offsetParent.scrollTop-3);
background-color: #EEEEEE;
z-index: 10;
But the Gridlines is not visible as column seperation in header row. can anyone help me in this regard.
Regards,
Manowj
|
|
|
|
|
Hi Friends
i use datagrid paging ,if i click paging the datagrid widthis increase or decrease depends upon the databinding.
how to fix the constant width in datagrid.
regards
saravanan
|
|
|
|
|
Hi,
On clicking Datagrid Press "F4" and go to properties and click the right most icon on top of the properties window. Go to Format tab and click columns and specify the width.
This will sort out the issue.
Regards,
Manowj
|
|
|
|
|
hi
plz tell me clearly
if possible tell the code
regards
saravanan
|
|
|
|
|
I want to input the date in a textbox in the details view control in the insert item template can you help me plz?
BiG RaLpH
|
|
|
|
|
Does anyone know of a grid control that would mimic the grid control used in MS Outlook and Microsoft Live! website. Specifically, I'm looking for a control in which I can bind the data in one row of a record to "One Cell" in a grid, but in different locations. So, in the end, I would have Field 1 in the first line, field 2 in the line right below field one, field 3 in the top-right hand corner, and so on, placing the fields as I like.
to get a better idea, you could look at the Outlook grid when the Reading Pane is set to be on the right, instead of the bottom.
Thanks
RR
|
|
|
|
|
Why don't you just use the Gridview control with a custom Template field. You could also try a datalist as this should work as well.
As far as custom controls go I use the ComponentArt library, this will also do what you are looking for (assuming I totally understand what you are looking for)
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to embed "Real Player" in ASP.NET web Application to run the .Rm and other audios/videos
|
|
|
|
|
WE have an ASP.NET forum, and in fact, you're going to do this, if it can be done, through HTML anyhow. There is no support in ASP.NET for real player, but if the real player supports this, it's just a case of embedding the right HTML in your page.
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 )
|
|
|
|
|
So what you just said.... If it's impossible, you can't, but is it's possible, just do it
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
|
How to send the input to the crystal report form the main forms
|
|
|
|
|
Please don't cross post
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 )
|
|
|
|
|
Hi, all
In a web application, how to select a folder(but not just a file)directly in a dialog like the winform's. I use a class FolderNameEditor.FolderBrowser but it's not shown correctly. Please help me if you have some idea.
Thanks
Best regards
|
|
|
|
|
There's loads of ways! Mostly I use this[^] treeview, but I can imagine you don't want to buy such a control for just a directory tree. However, have you considered filling a dataset and display is using a grid? You can even generate a HTML table or something....
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Need help here Badly...
i created a gridview inside a gridview (this is to view the extended details of a certain person because of too many fields, i decided to do this.) which is binded to a sqldatasource. i can now get the value of the PersonID and store it to a session variable named Session("PersonID").
Now, my Problem is, how am i going to pass the Session variable to the sqlDataSource when the sqlDatasource and the Gridview is Inside a Gridview?
|
|
|
|
|
Hi friends
I have two DataTable with same structure one coming from DataBase and second I create dynamic.
Now I have 5 records in datatable1 and 5 records in DataTable2.
I want to Merge DatatAble2 into Datatable1
I am trying this.
DataTable1.Merge(DataTable1);
But after that I am getting only 5records instead of 10 records.
thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
Are the primary keys between the two DataTables the same? This ispossibly why you're only seeing 5 records still.
from MSDN[^]:
When merging a new source DataTable into the target, any source rows with a DataRowState value of Unchanged, Modified, or Deleted, is matched to target rows with the same primary key values. Source rows with a DataRowState value of Added are matched to new target rows with the same primary key values as the new source rows.<br />
|
|
|
|
|
I have a question how to abandon session when user right clicks on task bar and selects close. I know how to abandon session in the case the user presses alt+ F4.
Share ur ideas with me
Thanks in advance
surya
|
|
|
|
|
Hi surya,
I would be intrested to know how you abandon the session when the user closes the web browser. As far my knowledge goes the session will still be active till the timeout period is reached even though the the browser is closed.
Since the is no way IIS could determine if a browser is open or closed.
Thank you
Laddie
|
|
|
|
|
I am creating a golf Application to keep track of my stats and I am using a formview. Is there a better way to do this...
Private Sub GetPutts()
Dim txtPuttOne As TextBox = Me.FormView1.FindControl("txtPuttsHoleOne")
Dim intPuttOne As Integer = CInt(txtPuttOne.Text)
Dim txtPuttTwo As TextBox = Me.FormView1.FindControl("txtPuttsHoleTwo")
Dim intPutttwo As Integer = CInt(txtPuttTwo.Text)
Dim txtPuttThree As TextBox = Me.FormView1.FindControl("txtPuttsHoleThree")
Dim intPuttThree As Integer = CInt(txtPuttThree.Text)
Dim txtPuttFour As TextBox = Me.FormView1.FindControl("txtPuttsHoleFour")
Dim intPuttFour As Integer = CInt(txtPuttFour.Text)
Dim txtPuttFive As TextBox = Me.FormView1.FindControl("txtPuttsHoleFive")
***all the way to Hole 18
Try
dsPutts.InsertCommand = "INSERT INTO [dbo].[Putt_Info] "
dsPutts.InsertCommand += "([CourseId] ,[UserId],[ScoreID],[PuttsHoleOne],"
dsPutts.InsertCommand += "[PuttsHoleTwo],[PuttsHoleThree],[PuttsHoleFour],"
dsPutts.InsertCommand += "[PuttsHoleFive],[PuttsHoleSix] ,[PuttsHoleSeven],"
dsPutts.InsertCommand += "[PuttsHoleEight],[PuttsHoleNine],[PuttsHoleTen],"
dsPutts.InsertCommand += "[PuttsHoleEleven],[PuttsHoleTwelve],[PuttsHoleThirteen],"
dsPutts.InsertCommand += "[PuttsHoleFourteen],[PuttsHoleFifteen],[PuttsHoleSixteen],"
dsPutts.InsertCommand += "[PuttsHoleSeventeen] ,[PuttsHoleEighteen])"
dsPutts.InsertCommand += "VALUES('" & courseID & "', '" & Session("UserName") & "', '"
dsPutts.InsertCommand += Session("ScoreID") & "'," & intPuttOne & "," & intPutttwo & "," & intPuttThree & "," & intPuttFour & "," & intPuttFive & "," & intPuttSix & "," & intPuttSeven
dsPutts.InsertCommand += "," & intPuttEight & "," & intPuttNine & "," & intPuttTen & "," & intPuttEleven & "," & intPuttTwelve & "," & intPuttThirteen
dsPutts.InsertCommand += "," & intPuttFourteen & "," & intPuttFifteen & "," & intPuttSixteen & "," & intPuttSevenTeen & "," & intPuttEighteen & ")"
dsPutts.InsertCommandType = SqlDataSourceCommandType.Text
dsPutts.Insert()
Catch ex As Exception
Response.Write(ex)
End Try
End Sub
I basically just want to grab the text the user enters in each of the controls and then insert it into the database.
Thanks in advance
|
|
|
|
|
well, if u r using VS.NET 2005 u can do it in a very simple way by using an SqlDataSource object. You can configure the SqlDataSource object by appropriately selecting the server name, the database and the table u want to add the data. Then it automatically generates the SELECT,INSERT,UPDATE,DELETE statements or u can use ur own stored Procedures to do them.
then drag n drop a formview on to the application and set it's datasource to SqlDataSource.
e.g: FormView1.DataSource = SqlDataSource1;
FormView1.DataBind();
|
|
|
|
|
Not quite what I was looking for. I do have a datasource and what not but I am looking for a better way to grab the actualy entered data without having to declare 2 variables (Textbox and a integer) just to get the data from the formview.
|
|
|
|