Click here to Skip to main content
15,895,667 members

Comments by SDAP_INDIA (Top 9 by date)

SDAP_INDIA 15-Jul-14 23:08pm View    
Hello,

I am Using Win Form in C# 4.0 Version
SDAP_INDIA 2-Feb-13 2:15am View    
thanks..
to alternate solution... but i have to do it as i want.
any script/command something else
SDAP_INDIA 10-May-12 9:30am View    
when i select the records from table
SDAP_INDIA 5-May-12 8:03am View    
i m using

1. select a.name,b.job1,b.job2 from Jobs b inner join Users a on a.name=b.name where b.dep='OP'

2. select a.name,b.job1,b.job2 from Jobs b inner join Users a on a.name=b.name where b.dep='SA'

I want result of both query result like below in a single selection query.

Name job1 job2 job1 job2
A 5 88 1 20
B 8 4 3 25
C 6 10 5 11
SDAP_INDIA 26-Apr-12 7:17am View    
Its working but i have binded my listbox with sql values like

if (!Page.IsPostBack)
{
str = "select * from TBL_NM_State where StateId<112";
cmd = new SqlCommand(str, con);
DataSet ds = new DataSet();
da.SelectCommand = cmd;
con.Open();
da.Fill(ds, "TB1");
Lst1.DataSource = ds.Tables[0].DefaultView;
Lst1.DataTextField = "Statename";
Lst1.DataValueField = "Statename";
Lst1.DataBind();

}

if (Lst1.SelectedIndex > -1)
{
Int32 idx = Lst1.SelectedIndex;
}

values are there but could not finding index values after clicking on particular item

( I think my sql values are not a part of items collection)