public void binddata()
OracleCommand cmd = new OracleCommand("SELECT * FROM EMP", conn);
OracleDataReader odr = cmd.ExecuteReader();
dt1.TableName = "FXD";
GridView1.DataSource = ds.Tables["FXD"];
in this way u can bind datatable to gridview..
I need to create an output file (.txt), but I need to manipulate the data in that file. I need to add “hard-coded” values for specific scenarios, for example, value needs to have a value in it but is “ “ in the output file because it doesn’t exist in the database. This needs to be automated because a user will click a download output file button and the file will ultimately be saved on their client machine. I assume anything can be done, but is there a good web site with examples of this that you could point me to? Thanks for any help you can give.
You just build your text in memory, then you use response.binarywrite and set the header so they get the file as a download.
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
I am using the regular technique of using a 2nd TextBox on my page so when the user presses Enter key, it automatically invokes the Submit buttons click event - but its not working. I also want to send the focus to the textbox when a link is clicked that displays this whole panel. Here's my code:
I tried both Page.SetFocus(..) and Form.DefaultFocus = ..
They work fine, the problem is: I have a LinkButton that shows and hides the panel. The focus works if the panel is initially visible - then if the link is clicked to hide it, the focus doesn't come back when the panel is visible again.
On the other hand, if the panel is not initially visible - then the focus never works. Here's my code, the first one in the Page Load:
Dim menuitem1 As New MenuItem("Main topic")<br />
Dim menuitem2 As New MenuItem(Sub topic")<br />
Me.Menu1.Items.AddAt(0, menuitem1)<br />
// Create Connection to Excel Workbook
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
OleDbCommand command = new OleDbCommand("Select * FROM [quality_standard$]", connection);
//OleDbCommand command = new OleDbCommand("Select qs_Id, qs_Organisation, Convert(varchar,qs_Start,111), qs_End FROM [quality_standard$]", connection);
// Create DbDataReader to Data Worksheet
using (OleDbDataReader dr = command.ExecuteReader())
// SQL Server Connection String
string sqlConnectionString = "REMOVED"
// Bulk Copy to SQL Server
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
bulkCopy.DestinationTableName = "tbl_QualityStandard";
The chart will appear within this DIV. This text will be replaced by the chart.