Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: I need help with C# loops Pin
PIEBALDconsult21-Jan-08 16:19
mvePIEBALDconsult21-Jan-08 16:19 
JokeRe: I need help with C# loops Pin
Guffa21-Jan-08 22:01
Guffa21-Jan-08 22:01 
GeneralPostMessage Problem Pin
stebo072821-Jan-08 9:02
stebo072821-Jan-08 9:02 
GeneralRe: PostMessage Problem Pin
stebo072821-Jan-08 10:40
stebo072821-Jan-08 10:40 
GeneralForm diagram Pin
netJP12L21-Jan-08 5:31
netJP12L21-Jan-08 5:31 
GeneralRe: Form diagram Pin
Gareth H21-Jan-08 8:09
Gareth H21-Jan-08 8:09 
GeneralRegarding Google language translation C# Pin
Member 470816321-Jan-08 4:48
Member 470816321-Jan-08 4:48 
Generalproblem with value from database Pin
eyeseetee21-Jan-08 4:31
eyeseetee21-Jan-08 4:31 
If i've got the following code and its selecting the following values

C0603~A81_01
C0603~A81

how can i change it so that it splits these two values up
at the moment it is reading it as C0603~A81_01C0603~A81

thanks in advance



string roomcodeselect = "Select room_code from room_types where room_code like '" + room_code + "%' ORDER BY room_code DESC";

SqlCommand cmdroomcode2 = new SqlCommand(roomcodeselect, con2);

StringBuilder htmlStr_room_code5 = new StringBuilder("");

SqlDataReader readerroomcode = cmdroomcode2.ExecuteReader();


while (readerroomcode.Read())
{
htmlStr_room_code5.Append(readerroomcode["room_code"]);
}

lbtest2.Text = htmlStr_room_code5.ToString();
Session["sessiontest1"] = lbtest2.Text.ToString();
//string test2 = (string)Session["Sessiontest1"];
db = Session["sessiontest1"].ToString(); // "jh00~pr11_01";

if (db.Contains("_"))
{
string[] split = db.Split('_');

string s_number = split[1];
int i_number = Int32.Parse(s_number);

i_number++;
s_number = i_number.ToString("00");

db = split[0] + "_" + s_number;
}
AnswerRe: problem with value from database Pin
Vikram A Punathambekar21-Jan-08 5:02
Vikram A Punathambekar21-Jan-08 5:02 
GeneralRe: problem with value from database Pin
Gareth H21-Jan-08 8:04
Gareth H21-Jan-08 8:04 
Generalradiobutton list enable one of the items Pin
eyeseetee21-Jan-08 3:31
eyeseetee21-Jan-08 3:31 
GeneralRe: radiobutton list enable one of the items Pin
Mustafa Ismail Mustafa21-Jan-08 3:36
Mustafa Ismail Mustafa21-Jan-08 3:36 
GeneralRe: radiobutton list enable one of the items Pin
eyeseetee21-Jan-08 3:48
eyeseetee21-Jan-08 3:48 
GeneralRe: radiobutton list enable one of the items Pin
eyeseetee21-Jan-08 3:56
eyeseetee21-Jan-08 3:56 
GeneralRe: radiobutton list enable one of the items Pin
Mustafa Ismail Mustafa21-Jan-08 3:59
Mustafa Ismail Mustafa21-Jan-08 3:59 
GeneralRe: radiobutton list enable one of the items Pin
eyeseetee21-Jan-08 4:05
eyeseetee21-Jan-08 4:05 
GeneralRe: radiobutton list enable one of the items Pin
Skippums21-Jan-08 7:04
Skippums21-Jan-08 7:04 
QuestionHow to overwrite datas in the storage?? Pin
peaceziz21-Jan-08 3:27
peaceziz21-Jan-08 3:27 
AnswerRe: How to overwrite datas in the storage?? Pin
Mustafa Ismail Mustafa21-Jan-08 3:33
Mustafa Ismail Mustafa21-Jan-08 3:33 
Questionhow to use the keyword 'LIKE' in SQL query in C# code, what will be the sentax of C# statement Pin
mavii21-Jan-08 2:32
mavii21-Jan-08 2:32 
AnswerRe: how to use the keyword 'LIKE' in SQL query in C# code, what will be the sentax of C# statement Pin
J4amieC21-Jan-08 2:34
J4amieC21-Jan-08 2:34 
GeneralRe: how to use the keyword 'LIKE' in SQL query in C# code, what will be the sentax of C# statement Pin
Colin Angus Mackay21-Jan-08 2:46
Colin Angus Mackay21-Jan-08 2:46 
GeneralRe: how to use the keyword 'LIKE' in SQL query in C# code, what will be the sentax of C# statement Pin
J4amieC21-Jan-08 3:15
J4amieC21-Jan-08 3:15 
GeneralRe: how to use the keyword 'LIKE' in SQL query in C# code, what will be the sentax of C# statement Pin
Colin Angus Mackay21-Jan-08 3:20
Colin Angus Mackay21-Jan-08 3:20 
GeneralRe: how to use the keyword 'LIKE' in SQL query in C# code, what will be the sentax of C# statement Pin
mavii21-Jan-08 5:49
mavii21-Jan-08 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.