|
Answer» I have a static website not dynamic.i have made the website in visual studio 2008.language c# ASP.NET. I have add a dropdownlist which contains 3 teachers name( e.g : john,smith,mark) and a textbox.i want when i select john from the dropdownlist it will DISPLAY this paragraph in textbox.
welcome John! Today you have english class Your timings are 3 to 6.
i am sending you the code plz correct where i am wrong.
if(DropDownList1.SelectecValue=="john"… { Textbox1.Text="welcome John! Today you have english class Your timings are 3 to 6.";
else if(DropDownList1.SelectecValue=="smith… { Textbox1.Text="welcome smith! Today you have french class Your timings are 3 to 6.";
else if(DropDownList1.SelectecValue=="mark"… { Textbox1.Text="welcome mark! Today you have spanish class Your timings are 3 to 6.";
else Textbox1.text="nothing selected";
but the problem in this coding is that it display the result in a single line like this "welcome John!Today you have english class Your timings are 3 to 6."
not as a paragraph i have tried to add break but it gives an ERROR .plz write the code. ThanksPlease read this: Insert carriage return/line feed with C# and ADO.NET in MS Access You should use "\N" (no QUOTES) to insert a new line.
|