|
Doesn't the session time out based on inactivity ? So as soon as the server does something, the session timeout is reset. But, your server cannot send anything to the client, the client has to request it. An obvious way is to have a timeout in the page that brings up a popup, clicking yes does a postback, thus persisting the session.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi i am rightnow building a chat application using asp.net 2.0and i am having this problem When a user sends a request using chat application to another user how will the server sends the response back to the other client that another user wants to start a chat session or wants to start a private chat or is inviting him to join a different room by opening a server enforced information pop up window
regards
Harry
|
|
|
|
|
harryforum wrote: that another user wants to start a chat session or wants to start a private chat or is inviting him to join a different room by opening a server enforced information pop up window
Not much idea, but a wild guess. You need to use XML file for communication. Both users should listen to same XML file frequently. Server can put popup command in this file. If client is getting that popup command from XML file, it should popup a new window. I hope you can expand this idea to a working model
|
|
|
|
|
u use any server for chat
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
You can't send the client anything, the client has to request it, so you need to either have a page that constantly refreshes itself, or a page that makes constant AJAX calls.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
error : [System.Threading.ThreadAbortException] = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}
when i use following code :
System.Web.HttpContext.Current.Response.OutputStream.Write((byte[])dsGetFileInfo.Tables[0].Rows[0].ItemArray[6], 0, int.Parse(dsGetFileInfo.Tables[0].Rows[0].ItemArray[0].ToString()));
its urgent .
thanks .
|
|
|
|
|
I m expecting to know exactly what output you want i will be providing the solution
contact me at:
chetan.patel@rigelnetworks.com
Best Regards,
Chetan Patel
|
|
|
|
|
The first step when your code is this messy, is to break it down into many smaller pieces of code, so you can work out which one has the problem.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian was right.
That method name is OOP ( Object Oriented Programming ).
|
|
|
|
|
I don't think OOP is the point here, he doesn't need an object, just better structured procedural code
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear All,
I am using asp.net2.0, C#, sql2005 using Visual studio 2005
Let Me explain the scenario I have checkboxlist containg 15 field. Based on no of checked field . I created dropdownlistbox and label dynamically through loop and assign id as dropdownlist + no of iteration. Now my question is how I access these control as when I am accessing one of the control I am getting nullobjectreference error stating “Object reference not set to an instance of an object.”I created control as
Foreach(listitem)
{
//…….
Label label = new Label();
DropDownList dropdownlist = new DropDownList();
//assinging id
label.ID = "label" + i.ToString() ;
dropdownlist.ID = "dropdownlist" + i.ToString() ;
}
And I am accessing it through
cmd.Parameters.Add("@para1", SqlDbType.VarChar).Value = Page.FindControl("label1").ToString() ;
cmd.Parameters.Add("@value1", SqlDbType.VarChar).Value = Page.FindControl("dropdownlist1").ToString();
and my second question is how do i access selected value in dropdownlist1(dynamically created control)
Please guide me
Thanks
imaran khan
|
|
|
|
|
Chetan Patel Sai Soft wrote: ask me directly to
chetan.patel@rigelnetworks.com
Spamming or Advertising ?
|
|
|
|
|
Your main problem is that if you don't add your controls bfore the page load event, viewstate will not be restored and so you don't be able to get the selected values as tehy won't be set in the code behind for you.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how to run (asp.net with C#) website using IIS
|
|
|
|
|
You must have to install .net Framework (appropriate version)
And have to install front page extension server
Best Regards,
Chetan Patel
|
|
|
|
|
<% If (Request.Form("Submit1") = True) Then
Response.Write("Hi")
End If
%>
<title>Untitled Page
i got the error at runtime
Conversion from string "" to type 'Boolean' is not valid.
please help...
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
YES, see Submit1 is empty and you cannot convert "" into a boolean.
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
|
What is the issue? Your submit1 control has a value "" (empty). And you cannot convert that empty value into boolean.
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
<% If Request.Form("Submit1") Then
Response.Write("Hi")
End If
%>
try this and enjoy
Best Regards,
Chetan Patel
|
|
|
|
|
|
R u passing 'true' or 'false' value as a submit1 var
if yes try this
Request.Form("Submit1") = "True"
Best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
All this is happening in a aspx page.
Submit1 is a html button
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<%
If Request.Form("Submit1") Then
Response.Write("Hi")
End If
%>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server">Sonia</asp:TextBox>
<input id="Submit1" type="submit" value="submit" /></div>
</form>
</body>
</html>
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
u r passing string value and checking boolean value so its give error
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
Hi,
Replace following things
Sonia Gupta wrote: If Request.Form("Submit1") Then
If Request.Form("Submit1") = "submit" Then
and
Sonia Gupta wrote:
I tried with the modified changes it's working...
The problem in ur code is Request.form("Submit1") returns string value....so its giving error..
and one more thing.....for submit button it should contain name attribute, when ever u click on that button the value will be passed to form
Regards,
Sandeep Kumar.V
|
|
|
|