View Complete Post
Yes I'm a newbie learning but I' developing a web app using Visual Studio 2010 where it gives the user three items to pick from and base on what they pick it returns the sub-category information which is in a SQL table. The three name below are ListItems
(below is the return information, the liskt of books that author wrote)
Would the code behind my Submitbutton(Default.aspx) be as follow:
Protect sub button1_click () handles button1_click
Dim connectionString as String = "server='localhost'; user id = ''; password = ''; database = ''"
Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "Select titlebooks * from bookTBL"
Dim sqlCommand As system.data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection)
Dim dataReader As System.Data.SqlClient.SqlDataReader = sqlCommand.executeReader(System.data.CommandBehavior.CloseConnection)
Would appreciate some help with this.
after a successful login I'd like to retrieve the users' name via C# and pass the name on as a parameter to populate a dropdown box or a grid view on the redirected page.
To authenticate a user I use the asp.net login control and I saw that I have access to several properties and methods but can't see text or value to just get the name back and pass it on for further processing.
Am I thinking wrong here?
Any hint on how to accomplish this is much appreciated.
I'm trying to make a dropdown list with data available based on the users login name. Heres what I have as my SQL Query in the SQLDataSource:
SELECT Client_Name, Client_ID FROM Client WHERE (Client_Name LIKE '%@Client_Name%')
So say if the login username is "User1" but the database client name is "User1 Steel" I want the dropdownlist to pull "User1 Steel" as the display and Client_ID as the value from the dropdown list.
I dont know how to use the session data!
I'm trying to trying to create a tabe which can be resized by the user by entering the number of rows and columns in textboxes. The user should also be able to change the background color of the individual cells by clicking on them. I have figured out the code for this.
I did first try to create this table dynamically, but then I couldn't persist the changes to the table between postbascks, and I couldn't get any data from the cells when I wanted to save the table. Therefore I'm thinking of creating a repeater instead. If so, how could I specify how many times the repeater should repeat?.
I don't have a complete representation of the table in any database, I just store the exceptions and the number of rows and columns.
If anyone have a better solution to have I can do this, please share.
I have a data view web part that inserts a new record into a sql table. This works fine.
I have now needed to add a trigger to the sql table that sends an email when a new record is inserted (the code for which works fine) but now my insert fails with 'The data source control failed to execute the insert command.'.
If I disable the trigger the form works fine again.
Any ideas what could be causing this?
Hi, I have a profile of member to be displayed. I am using a dataset with all the data table adapter to retrieve the information from database.
I have a memContact method which has NRIC and Number as a composition primary key. Thus, automatically, the table adapter has created a method called FindByICNum () for me. However, when I do the search to display the contents, i will only need to search by memberic instead.
Is there anyway to change the table adapter query?
I am trying to access site username and insert that name into list
I am trying to configure asp.net login name control with list column but for that control not having any property to configure that with list column
Is there any solution to configure asp.net control with list column by using sharepoint designer 2010?
I have a data table that contains some values for Certifications. This table can be updated in a different part of my application. On the web page I am currently working on, I would like to have check boxes appear for every value in the data table. I have been struggling with this trying to use a For Each loop and I cannot get it to work for anything. Any suggestions?
I am using the following Razor syntax to obtain my data (I know this works because I can display it in a WebGrid):
var db = Database.Open("MyConn");
I'd like to record more information than the default control allows as well as perform actions with the input when the form is submitted but I'm having trouble figuring out how.
So firstly, if I want to record the middlename for example, how would I do that, and by default, where would it go if anywhere?When the form is submitted, I'd like to take specific input, such as just the middlename for example, and write some linq to sql code to specify when and how it's stored.In what event would I put this code?