Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am new to this so please be kind! I am working with C# and want to be able to select a row from gridview

I am new to this so please be kind! I am working with C# and want to be able to select a row from gridview (returned to TextBox1) and run this sql query:

Select grade1.Grade, grade1.Date FROM dbo.grade1 WHERE grade1.Host = ( TextBox1.Text) ORDER BY grade1.Date

I don't mind if the output is in a new page or a text box on the same page. Please Help!

using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Web.UI; using System.Web.UI.WebControls; namespace WebApplication2 { public partial class Domain : System.Web.UI.Page { SqlConnection con = new SqlConnection(my connection String...); protected void Page_Load(object sender, EventArgs e) { } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridView1.SelectedRow; TextBox1.Text = row.Cells[1].Text; } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

LOQ 6-10: Where are feature detectors located, and what do they do?

Answered: 1 week ago

Question

What is Constitution, Political System and Public Policy? In India

Answered: 1 week ago

Question

What is Environment and Ecology? Explain with examples

Answered: 1 week ago