the output of select command
-
I have a table named(information)tha has 3 columns(id,fnam,lnam) I know that I can select an special row by
select form information (id,fname,lname)WHERE id="1"
////I want to do this for example:
string lname="last name witch it's id is "1"";
///and I want to access this by tableplz help me!!!
-
I have a table named(information)tha has 3 columns(id,fnam,lnam) I know that I can select an special row by
select form information (id,fname,lname)WHERE id="1"
////I want to do this for example:
string lname="last name witch it's id is "1"";
///and I want to access this by tableplz help me!!!
You're probabyl going to be just fine with this
SELECT id,fname,lname
FROM information
WHERE id = 1 -
You're probabyl going to be just fine with this
SELECT id,fname,lname
FROM information
WHERE id = 1ok,but how can I access the fname as string ; my code is like this:
protected void page_Load(object sender, EventArgs e)
{
//session["field3"] contains an Id from previous page
Id.Value = (string)Session["field3"];
}
protected void salam(object sender,EventArgs e)
{
name.value="the row's name witch it's id is session["field3"]"}
do you undrestand me?
-
ok,but how can I access the fname as string ; my code is like this:
protected void page_Load(object sender, EventArgs e)
{
//session["field3"] contains an Id from previous page
Id.Value = (string)Session["field3"];
}
protected void salam(object sender,EventArgs e)
{
name.value="the row's name witch it's id is session["field3"]"}
do you undrestand me?
Not really :(. Can you give me some more details on what specifically are you trying to do?
-
Not really :(. Can you give me some more details on what specifically are you trying to do?
ok,I put all of codes here!
///In the getid.aspx page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="authenticate1.aspx.cs" Inherits="hokm.Admin.authenticate1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">protected void salam(object sender, EventArgs e) { Session\["field1"\] = sh1.Text; Response.Redirect("editinformation.aspx"); }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server" enctype="multipart/form-data" >
<div dir="rtl">
<table>
<tr class="style1">
<td width="3%" bgcolor="#FF6666">
Please enter your id number
<br />
<br />
<asp:TextBox name="shomare" ID="sh1" runat="server"/>
<br />
<br />
<asp:Button ID="Button1" Width="60" runat="server" Text="confirm" OnClick="salam" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>so I put the Id in session["field1"];
and in the editinformation.aspxprotected void page\_Load(object sender, EventArgs e) { sh.Value = (string)Session\["field3"\]; }
<td colspan="5">
ID number:
<input name="shomare karmandy" disabled="disabled" id ="sh" runat="server" />
</td>name:
you see that I have filled the id textbox with a value,and I want to do this with name input,but I dont know how should I use the database to access the name with this Id?????