聊天室错误.... [英] chat room error....
本文介绍了聊天室错误....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请问先生,我的聊天室出现错误,错误是输入字符串的格式不正确".我的会议室数据库无法正常工作,我也发送了实际存在的代码.如果可以的话,请更正我的代码?
Respected Sir i have an error in my Chat room, the error is "Input string was not in a correct format." my Room database is not working i am also sending the code which is infacted. Kindly Correct me my code if any One can??
private void GetRoomInformation()
{
LinqChatDataContext db = new LinqChatDataContext();
var room = (from r in db.Rooms
where r.RoomID == Convert.ToInt32(lblRoomId.Text)
select r).SingleOrDefault();
lblRoomId.Text = room.RoomID.ToString();
lblRoomName.Text = room.Name;
}
推荐答案
错误消息输入字符串格式不正确."表示在lblRoomId中输入的数据不是可以转换为整数的数字-它包含的字符不是0-> 9
The error message "Input string was not in a correct format." means that the data entered in lblRoomId is not a number that can be converted to an integer - it contains characters which are not 0->9
这篇关于聊天室错误....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文