hello
i made databse that contain images description like price details etc
i place pics on asp page
<img src = "" ...........>
i want to do that when i click on image image descripton from databse comes on page
my c# code is
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
String str = "provider = Microsoft.ACE.OLEDB.12.0; Data Source = image.accdb; Persist Security Info = False;";
OleDbConnection conn = new OleDbConnection(str);
conn.Open();
string sql = "SELECT * FROM image where Name = p1";
OleDbCommand cmd = new OleDbCommand(sql, conn);
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
Session["price"] = "TextBox2.Text";
Response.Redirect("Default.aspx");
code on aspx page
<script type ="text/javascript">\
function f2(value){
document.getElementById('TextBox1').value = value;
}
</script>
<style type="text/css">
<img src = "p1.jpg"http://images.daniweb.com/vbulletin/editor/color.gif value = "p1" onclick = "f2(value)"/>
</td>
<td>
<input type = "text" id = "TextBox1" Height="65px"
Width="195px"></asp:TextBox