I have a formview bound to a SqlDataSource which I use to insert a record to the database. for this newly inserted record, I want to generate a unique ID programmaticaly - (say ProjectID) and assign it to the formview control (PropertyIDLabel). a method createPropertyID() generates a PropertyID & returns it, but I don't know how I can set this value to the formview control. Can somebody help - immediately please???
chathu03j
Posts
-
How to set values to a formview control programmaically -
how to get values from the database to a dropdown list [modified]try the following code: C#: ----- SqlConnection con = new SqlConnection(connectionString); String sql = "SELECT FROM "; SqlCommand cmd =new SqlCommand(sql,con); SqlDataAdapter sda =new SqlDataAdapter(cmd); DataTable dt =new DataTable(); con.Open(); sda.Fill(dt); DropDownList1.DataSource =dt; DropDownList1.DataBind();
-
CheckedChanged not firing in UpdatePaneltry adding the checkedbox to the trigger collection of the UpdatePanel
-
Using Login & LoginView controlsYeah! Please Tell me from scratch how to do it. I tried to use Login1_Authenticated() method to manually check the username & password but it didn't work. Please tell me how to do the login & Display the username in the login view control. Also How to handle LoggedInTeTemplate & AnnonymousTemplate... Thanks
-
how can i display data in listbox?use the following coding... String sql = "SELECT Category Name FROM Categories"; OleDbConnection con = new OleDbConnection(connectionString); OleDbCommand cmd = new OleDbCommand(sql,con); OleDbDataAdapter da = new OleDbDataAdapter(cmd); DataTable dt =new DataTable(); con.Open(); da.Fill(dt); ListBox1.DataSource = dt; ListBox1.DataBind();
-
How to use FormView in my webForm ?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();
-
FormView Issuewell, 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();
-
Using Login & LoginView controlscan u pls put down a sample code here? thanks in advance.....
-
Using Login & LoginView controlsHi, I have a login control in my ASp.NET application. I use 'Users' table in SQL Server 2005 to authenticate the login. If the username & password are correct, I want to display the username in the loginview control. How can I do that?:confused:
-
calling a javascriptHi I want to call a javascript from a client page. the javascript is in the server. can I do that? If so how?? thanks for any reply!!
-
using file uploader in a gridviewI want to have a File uploader inside a grid view control. I have bound this grid view to a datasource, so can I use the file uploader inside the gridview? I will have to writer manual coding to upload the file, isn't it? can somebody tell me how I can sent the filename of the uploaded file to the datasource parameter?? thanks for any answer!!!
-
coding for crystal reports in ASP.NETHi all, can smbody please give me the codings to create a crystal report in ASP.NET? I need to extract data to the report from a specified query. How to provide the query to the crystal report?? and how do you display it on the web page, can I use the reportviewer to do that or is there anty other method? Thanks for any reply!!
-
POST method in ASP.NEThow do you retreive the variable values that you post from one page, in the calling page? that is, in PHP you can use $variable=$_POST['control name'] is there a similar thing in ASP.NET? I want to know of a method other than passing variables with the URL.
-
PHP echo equivalent???HI, is there a ASP.NET equivalent for PHP's echo command? Or else is there a way to write on a web page without using a label or a textfield? Thanks for any reply!!
-
creating dynamic crystal reportsHi all, I want to learn how to create dynamic crystal reports in C#.NET. that is, when I pass parameter values through the application interface, they should be the criteria for the crystal report. How do you do this. Can anyone give me any online tutorials I can refer to. thanks for any reply...
-
To format date in mysqlHi all, How do you format the system date according to mysql date format? When I give the data type as date in mysql, there's an error message saying cannot convert data/time to mysql date format. How do I overcome this? Thanks for any reply.....
-
creating control arrays in vb.nethow do you create a control array in vb.net?
-
create a control array in C#how do you create a control array in C#?
-
connect a mysql database to c# projectI'm quite new to c#. Can smbody pls tell me how to connect a mysql database to a c# project? Thanks