Thank you for the tip ;)
Waddatah
Thank you for the tip ;)
Waddatah
That code is working really fine --------------------------------------------------------------------- { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (User.Identity.Name == null) { Response.Redirect("login.aspx"); } String online; if (Application["online"] != null) { online = Application["online"].ToString(); } else { online = ""; } if (online.IndexOf(User.Identity.Name) == -1) { if (String.IsNullOrEmpty(online)) { online = User.Identity.Name; } else { online = online + "," + User.Identity.Name; } Application.Remove("online"); Application.Add("online", online); } ListBox1.Items.Clear(); char[] splitter = { ',' }; foreach (String onlineuser in online.Split(splitter)) { ListBox1.Items.Add(onlineuser); } } protected void Button2_Click(object sender, EventArgs e) { String chat; String oldChat; if (Application["chat"] != null) { oldChat = Application["chat"].ToString(); } else { oldChat = ""; } chat = oldChat + "<br>" + User.Identity.Name + ":" + txtSkriv.Text; Application.Remove("chat"); Application.Add("chat", chat); } protected void Button3_Click(object sender, EventArgs e) { Session.Clear(); Response.Redirect("login.aspx"); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { } } }
Waddatah
this code is working really good { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (User.Identity.Name == null) { Response.Redirect("login.aspx"); } String online; if (Application["online"] != null) { online = Application["online"].ToString(); } else { online = ""; } if (online.IndexOf(User.Identity.Name) == -1) { if (String.IsNullOrEmpty(online)) { online = User.Identity.Name; } else { online = online + "," + User.Identity.Name; } Application.Remove("online"); Application.Add("online", online); } ListBox1.Items.Clear(); char[] splitter = { ',' }; foreach (String onlineuser in online.Split(splitter)) { ListBox1.Items.Add(onlineuser); } } protected void Button2_Click(object sender, EventArgs e) { String chat; String oldChat; if (Application["chat"] != null) { oldChat = Application["chat"].ToString(); } else { oldChat = ""; } chat = oldChat + "<br>" + User.Identity.Name + ":" + txtSkriv.Text; Application.Remove("chat"); Application.Add("chat", chat); } protected void Button3_Click(object sender, EventArgs e) { Session.Clear(); Response.Redirect("login.aspx"); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { } } }
Waddatah
thanks for the comment it is working now i saw i made a little mistake but the code i sent wasn´t the full code
Waddatah
i am sorry :( but i am new at this.. hehe thank you now i know.. no iam from sweden so english is not my native language so sorry :/ but i promise to be better on english
Waddatah
Thank you :D it is working really fine now here is the new code thank you is workin really fine now... here is the new code ----------------- if (online.IndexOf(User.Identity.Name) == -1) { if (String.IsNullOrEmpty(online)) { online = User.Identity.Name; } else { online = online + "," + User.Identity.Name; } Application.Remove( "online"); Application.Add( "online", online); } ListBox1.Items.Clear(); char[] splitter = { ',' };
Waddatah
[Message Deleted]
you guys who complains here comes the full code and it´s working really good no problems at all(this is the dafault page) -------------------------------------------------------------------------- { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (User.Identity.Name == null) { Response.Redirect("login.aspx"); } String online; if (Application["online"] != null) { online = Application["online"].ToString(); } else { online = ""; } if (online.IndexOf(User.Identity.Name) == -1) { if (String.IsNullOrEmpty(online)) { online = User.Identity.Name; } else { online = online + "," + User.Identity.Name; } Application.Remove("online"); Application.Add("online", online); } ListBox1.Items.Clear(); char[] splitter = { ',' }; foreach (String onlineuser in online.Split(splitter)) { ListBox1.Items.Add(onlineuser); } } protected void Button2_Click(object sender, EventArgs e) { String chat; String oldChat; if (Application["chat"] != null) { oldChat = Application["chat"].ToString(); } else { oldChat = ""; } chat = oldChat + "<br>" + User.Identity.Name + ":" + txtSkriv.Text; Application.Remove("chat"); Application.Add("chat", chat); } protected void Button3_Click(object sender, EventArgs e) { Session.Clear(); Response.Redirect("login.aspx"); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { } } } -------------------------------------------------------------------------- //BoBzIz:wtf:
[Message Deleted]
Thx :D i found much about chat but i didnt found anything about a who´s online box :/ but it was a good site thank you ;) i can use that site in the future
Waddatah
Thanks for the tip ;)
Waddatah
hehe:cool:
Waddatah
[Message Deleted]
Hello i am working with a chat in c# and there´s one thing left to do, a list of members who are in the chat, in a listbox. tried for hours but i am not comming anywhere so now i am asking for help.. so please can some one help me :) //Bobbziz
Waddatah
Hello i am working with a chat in c# and there´s one thing left to do a list of members who are in the that in a listbox. tried for hours but i am not cooming anywhere so now i am asking for help.. so please can some one help me :) //Bobbziz
Waddatah
Hello i am working with a chat in c# and there´s one thing left to do a list of members who are in the that in a listbox. tried for hours but i am not cooming anywhere so now i am asking for help.. so please can some one help me :) //Bobbziz
Waddatah