hello,
in my webpage i have one textbox that i type like this a,b,c now i wan to do this get a then pass in my fuction then get one table then pass b in my fuction thne get table then same with c now how i combine thease three table
i am useing foreach loop for pass the value one by one in my fuction but i dont get how to combine thease table in to one table
pls give me some idea or code better to do this
and any idea
thanks
Loading

Dharmesh SharmaPosted Jan 21, 2012, 4:13 AM
thats all table i want to combine coz i want to show in listview
i found another solution i just pass textbox in sql
first seprate from comma then store in temp talble then use cursor for searching one by one
i hope its working for me
i have another problem is
when type user any tags that time i want to shw listview data i do cde in textchanged events but not working
so plseas give me idea how i bind listview on textchanged events but not fire this event
i use update panel and textbox postback =true
have any idea
thank
Sam HobbsPosted Jan 21, 2012, 3:58 AM
So you say that the user will enter tags into a textbox and the tags will be separated by commas. There are other ways to enter data like that but if your users want to use commas then that is good.
So you want to separate the tags from the commas and then use the tag ids to get data from a table about each tag. Is that correct? And you want to put the data into a ListView. Will the number of records in the ListView usually be the number of tags in the textbox?
Dharmesh SharmaPosted Jan 21, 2012, 12:32 AM
You are right i dont want to give me any code .
i explane how i am doiing and what i want to next
in my web page has one textbox and one listview
and one admin section that admin can add the criminal record and i have add one option with tags i mean
i add lots of tags realeted to that criminal that tags i store in one table and each tags per rows with criminal id thats a forgin key
now when user enter the the textbox some tags like A,B,C,D
now i want to do like (may be not good ways) first i am doing comma seprate value then by foreach loop each tags i pass in my fuction. This fuction just retun datatable that have tags realted data . now this table come for each tags
so thease table i want to bind into my listview may be this can be do by better by SQL
so no need to combine in c#
we can do in SQL i thing
pass the stirng A,B,C,D then seprate from comma and get table then retrun all combine table
i hope you understand my problem problem is simple i dont get how to combine table in on table cos table retrun every time same but diff data
OR
How we do in SQL
give any idea
thanks
Sam HobbsPosted Jan 20, 2012, 1:50 PM
The DataTable class has a Rows collection. You can create one table and pass that around and all three tables can be on instead. The DataTable class also has Load, LoadDataRow and Merge methods. You should be able to use one of them.
Dharmesh SharmaPosted Jan 20, 2012, 12:32 PM
its jut simple thing i do
in textbox has a,b,c
now i want to do like this
string spword;
foreach (string word in spwor)
{
datatable dt =conn.get_crime_details(word first word);
}
this is not code this scdeocode
this is just ways that i thinging to do
now foreach loop run three time for(a,b,c)
that retrun dt every time that three table i want ot take union or combin
thats my idea
if you have better idea give me
thanks
Posted Jan 20, 2012, 8:49 AM
2) What the function actually does ?
Please explain the question little more.