Click here to Skip to main content
15,891,607 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How Can I get The Previous Page URL??? Pin
lakshmichawala28-Nov-07 22:02
lakshmichawala28-Nov-07 22:02 
GeneralRe: How Can I get The Previous Page URL??? Pin
Vanamaindia28-Nov-07 22:06
Vanamaindia28-Nov-07 22:06 
QuestionDetailsview Pin
dandamudi padma28-Nov-07 17:44
dandamudi padma28-Nov-07 17:44 
AnswerRe: Detailsview Pin
komalcse28-Nov-07 19:12
komalcse28-Nov-07 19:12 
QuestionDetailsview Pin
dandamudi padma28-Nov-07 17:44
dandamudi padma28-Nov-07 17:44 
Questionhow to export a crystal report to pdf programatically Pin
chithra.r28-Nov-07 17:41
chithra.r28-Nov-07 17:41 
AnswerRe: how to export a crystal report to pdf programatically Pin
Laxmikant Lad28-Nov-07 18:08
Laxmikant Lad28-Nov-07 18:08 
QuestionConference chat problem Pin
SreejithAchutan28-Nov-07 17:34
SreejithAchutan28-Nov-07 17:34 
If we have a database where we can store all the users list.If any of them are in online we want to conference chat with all the online users.Is any code available for this conference.I attach one code with this mail .In that code we can chat with one -to-one users as in gmail or rediff web application.But if i want to chat with more than one users like conference chat in yahoo messenger,what changes i need.if i specify the window name by any string not with users name specifing by a variable,the conference is possible.Please help sir .I want to implement this in my project.Early u people send some links to me ,but all are using dlls so i cant integrate it in my pjct.Kindly help....The code is attached below.

//Code to send msg to the online user

protected void BtnSend_Click(object sender, EventArgs e)
{
string toUserName;
string chatMsg;
DateTime chatDate;
string fromUserName;
try
{
fromUserName = User.Identity.Name;
toUserName = HidToUser.Value;
MembershipUser objMemberTo = Membership.GetUser(toUserName);
if (objMemberTo.IsOnline == false)
{
lblMsg.Visible = true;
lblMsg.Text = toUserName + "is Offline now. ";
}
chatMsg = ChatText.Text;
chatDate = System.DateTime.Now.ToLocalTime();
string fromUserID, toUserID;
MembershipUser objMemberFrom = Membership.GetUser(fromUserName);
fromUserID = objMemberFrom.ProviderUserKey.ToString();
//MembershipUser objMemberTo = Membership.GetUser(toUserName);
toUserID = objMemberTo.ProviderUserKey.ToString();
if (!string.IsNullOrEmpty(ChatText.Text))
{
if (ChatText.MaxLength <= 4000)
{
db_chat.InsertChatMessage(fromUserID, toUserID, chatMsg, chatDate, false);
}
}
DisplayChatMessage();
Label1.Text = "tony";
lblMsg.Text = "hai";
}
finally
{

}
}

protected void DisplayChatMessage()
{
DataTable dtChatMsg;
string fromUser;
string toUser;
string toUid, fromUid;
fromUser = User.Identity.Name;
toUser = HidToUser.Value;
MembershipUser objMemberTo = Membership.GetUser(toUser);
toUid = objMemberTo.ProviderUserKey.ToString();
MembershipUser objMemberFrom = Membership.GetUser(fromUser);
fromUid = objMemberFrom.ProviderUserKey.ToString();
DateTime loginTime = new DateTime();
loginTime = objMemberFrom.LastLoginDate;
dtChatMsg = db_chat.GetChatMessage(toUid, fromUid, loginTime);
DataColumn dc = new DataColumn("UserName");
dc.DataType = System.Type.GetType("System.String");
dtChatMsg.Columns.Add(dc);
if (dtChatMsg.Rows.Count > 0)
{
foreach (DataRow dr in dtChatMsg.Rows)
{

if (dr["FromUser"].ToString() == fromUid)
{
dr["UserName"] = "me";
}
else if (dr["FromUser"].ToString() == toUid)
{
dr["UserName"] = toUser;
}
}

Chatlist.DataSource = dtChatMsg;
Chatlist.DataBind();
}
}
}
QuestionBenefit of make the business layer class as sealed class Pin
hogan.smith28-Nov-07 17:31
hogan.smith28-Nov-07 17:31 
AnswerRe: Benefit of make the business layer class as sealed class Pin
Michael Sync28-Nov-07 18:43
Michael Sync28-Nov-07 18:43 
GeneralRe: Benefit of make the business layer class as sealed class Pin
hogan.smith28-Nov-07 19:05
hogan.smith28-Nov-07 19:05 
Questionget SCOPE_IDENTITY() in asp.net Pin
AnhTin28-Nov-07 16:53
AnhTin28-Nov-07 16:53 
AnswerRe: get SCOPE_IDENTITY() in asp.net Pin
Michael Sync28-Nov-07 16:55
Michael Sync28-Nov-07 16:55 
GeneralRe: get SCOPE_IDENTITY() in asp.net Pin
AnhTin28-Nov-07 17:13
AnhTin28-Nov-07 17:13 
QuestionPushing Multiple Files In One Response Pin
RB@Emphasys28-Nov-07 12:29
RB@Emphasys28-Nov-07 12:29 
AnswerRe: Pushing Multiple Files In One Response Pin
Prateek G28-Nov-07 17:42
Prateek G28-Nov-07 17:42 
QuestionFloor Map Pin
alexfromto28-Nov-07 8:32
alexfromto28-Nov-07 8:32 
AnswerRe: Floor Map Pin
Paul Conrad28-Nov-07 16:24
professionalPaul Conrad28-Nov-07 16:24 
GeneralRe: Floor Map Pin
alexfromto29-Nov-07 2:51
alexfromto29-Nov-07 2:51 
QuestionMake connection to Excel Pin
raushan raj28-Nov-07 7:03
raushan raj28-Nov-07 7:03 
AnswerRe: Make connection to Excel Pin
pmarfleet28-Nov-07 8:44
pmarfleet28-Nov-07 8:44 
GeneralRe: Make connection to Excel Pin
Amol M Vaidya28-Nov-07 16:42
professionalAmol M Vaidya28-Nov-07 16:42 
GeneralRe: Make connection to Excel Pin
pmarfleet28-Nov-07 19:34
pmarfleet28-Nov-07 19:34 
QuestionBest books on ASP .NET Pin
Mohammad A Gdeisat28-Nov-07 5:42
Mohammad A Gdeisat28-Nov-07 5:42 
AnswerRe: Best books on ASP .NET Pin
Paul Conrad28-Nov-07 16:25
professionalPaul Conrad28-Nov-07 16:25 

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.