|
Hi Guys,
Anybody knows of a good implementation in ASP.NET using C# where you have 2 list boxes and you want to move items between them.
Records will be coming to first list box from database.
Like…
[Available Items] << < > [Select Items]
If not going to use AJAX.
Thanks
|
|
|
|
|
There's tons of examples for this on the web. IT's not an ASP.NET problem, unless you want to do a postback every time. Otherwise, it's a javascript problem.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Have you tried it by yourself or have you googled for this? I think you might have got lot of answers regarding this if you have tried. By the way, you can try like the following:
ListBox2.Items.Add(ListBox1.SelectedItem);
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
saanj wrote: ListBox2.Items.Add(ListBox1.SelectedItem);
I will suggest him do using javascript rather than server side code. Because it will causes unnecessary postback
|
|
|
|
|
Oh Yeah Abhijeet, you are absolutely right.
But consider a case when the javascript may be disabled on the browser. I know that the proability will be very less. But it would be better if he can write the code in two places. One should be in javascript and the other one should be in code-behind. If the js one fails then the server side code will be executed. I would like to know your point of view regarding this.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
saanj wrote: would like to know your point of view regarding this.
Just to avoid unnecessary Postback !
|
|
|
|
|
I was using serverside code...
I am not good in JavaScript..
Could you please help me with that part..
Thanks..
|
|
|
|
|
Which code have you tried ? post it plz
|
|
|
|
|
serverside code..
I am not good in javascript.
|
|
|
|
|
Yes. Server side code. tell us what is the problem first. Just post your code. Like our experts said it might be a simple postback problem.
|
|
|
|
|
I have hosted my website www.runningcodes.net but the problem is i dont have guys/fellas around me to share ideas so as to make it a success. I am all alone doing it myself and even finding it difficult to think cos am not the smart type of guy. please if you think you are good and is going to be of help to me without me paying you, i would whole heartedly welcome you. thanks in advance. stealthslow@gmail.com or bdl_hafeez@yahoo.com
|
|
|
|
|
Abdulhafeezo wrote: please if you think you are good and is going to be of help to me without me paying you, i would whole heartedly welcome you.
ROTFL. I'd welcome all sorts of unpaid help, actually. Would you like to landscape my garden, or fix my car, or even just do my dishes ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi all,
I have a requirement.Is it possible to upload videos to Youtube from asp.net.Because I have some video files and the client wants to view or play this video from youtube.Is it possible?If yes,Pls give some links or give some help.
Thanks
Denny
|
|
|
|
|
Have you tried reading youtube to see if they offer some sort of API to auto post videos ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
Great and useful link.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
You can directly go to youtube and upload it. If you want to upload through program code then you probably have to check whether there is any API exposed or not. Without using the API, you will never be able to upload through code.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
|
|
Either you love IT or leave IT...
|
|
|
|
|
Hi all ,
I want to display pdf on the browser using using C# can any one help to solve this problem . Thanks in advance
Thanks
Amit
|
|
|
|
|
add response.redirect("The PDF file path") in the code
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
The probem is pdf creation is handled by back hand which is in java...and they sending bytes to me......i dont have any direct path.....
|
|
|
|
|
Amit Patel1985 wrote: back hand
Its back end and not back hand
Amit Patel1985 wrote: i dont have any direct path.....
you can write the byte array to he Response.Output
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi i m using asp.net c#
n i m trying to save data in to data base it give error at time of save
code is
cmd.CommandText = "select invoice_no from invoice where invoice_no=(select Max(invoice_no) from invoice)";
adp.Fill(ds, "dm");
foreach (DataRow dm in ds.Tables["dm"].Rows)
{
Label2.Text = dm["invoice_no"].ToString();
}
Label2.Text = Convert.ToString( Convert.ToInt32(Label2.Text) + 1);
// add in the table material incoming
cmd.CommandText = "Select * from invoice";
adp.Fill(ds, "re");
dr = ds.Tables["re"].NewRow();
cb = new SqlCommandBuilder(adp);
adp.Update(ds.Tables["re"]);
dr = ds.Tables["re"].NewRow();
dr["invoice_no"] = Convert.ToString(l);
//dr["enterby"] = Label64.Text; //ddlinby.SelectedIndex.ToString();
dr["po_no"] = TextBox2.Text;
dr["dc_no"] = TextBox3.Text;
dr["comp_name"] = TextBox4.Text;
dr["comp_add"] = TextBox5.Text;
dr["tin_no"] = TextBox42.Text;
dr["total_vat"] = TextBox34.Text;
dr["prod1"] = TextBox35.Text;
dr["prod2"] = TextBox36.Text;
dr["prod3"] = TextBox37.Text;
dr["prod4"] = TextBox38.Text;
dr["prod5"] = TextBox39.Text;
dr["prod6"] = TextBox40.Text;
dr["prod1_q"] = TextBox12.Text;
dr["prod2_q"] = TextBox13.Text;
dr["prod3_q"] = TextBox14.Text;
dr["prod4_q"] = TextBox15.Text;
dr["prod5_q"] = TextBox16.Text;
dr["prod6_q"] = TextBox17.Text;
dr["prod1_p"] = TextBox18.Text;
dr["prod2_p"] = TextBox19.Text;
dr["prod3_p"] = TextBox20.Text;
dr["prod4_p"] = TextBox21.Text;
dr["prod5_p"] = TextBox22.Text;
dr["prod6_p"] = TextBox23.Text;
dr["vat"] = TextBox31.Text;
dr["total"] = TextBox30.Text;
dr["price"] = TextBox33.Text;
ds.Tables["re"].Rows.Add(dr);
cmd.CommandText = "Select * from invoice";
cb = new SqlCommandBuilder(adp);
adp.Update(ds.Tables["re"]);
and error is
String or binary data would be truncated.The statement has been terminated.
at this line
adp.Update(ds.Tables["re"]);
pls help me
|
|
|
|