|
Hi ,
i'm using asyncronous socket programming in my application and
database is in another remote server.
if I send a msg from client to server the server has to take that message as a keyword to search something in the database.
but if the database connectivity is lost it can have one more option to search in a local xml .file.
This works fine when the conection between client -server and server -to remote databse server is fine.
but if the server to remote database connectivity is lost and still the client - server connectivity is fine,
then my client keep on sending commands to server where the server keep on looking for database connectivity and after a long period of time ,
the control coming to application to work with xml file.
i need to avoid the client from keep on sending commands. once it is searching for databse connectivity ,
since i'm using asyncronous sockets i'm not aware of what is happening once the handler is being created.
anybody can help me in this..
thanks and regards
vils
|
|
|
|
|
Hi all
My problem is as follows, I have a ASP Table. Then I add rows/columns in code behind, but one of my columns is a control. I need to see when the Index have changed for specific reasons but the event doesnt fire...
Here is my code, something wrong??
<br />
TableRow tr = new TableRow();<br />
TableCell tblCell = new TableCell();<br />
<br />
RadioButtonList rbL = new RadioButtonList();<br />
rbL.RepeatDirection = RepeatDirection.Horizontal;<br />
rbL.SelectedIndexChanged += new EventHandler(rbL_SelectedIndexChanged);<br />
rbL.Items.Add("Yes");<br />
rbL.Items.Add("No"); <br />
<br />
tblCell.Controls.Add(rbL);<br />
tr.Cells.Add(tblCell);<br />
<br />
tblSurvey.Rows.Add(tr);<br />
<br />
void rbL_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
}<br />
|
|
|
|
|
Unless I miss my guess, I believe that your issue is caused by a change in the automatic ids assigned to controls during each postback. I believe that if assign an explicit value to the ID property of your RadioButtonList , it will solve your problem. Also, verify that your table has an ID assigned to it, and is being placed in the same container on the page.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hey Jesse, thanx for the quick rely!
Ok, I assigned the RadioButtonList' ID explicitly now.
But it is still not Fireing for some reason
I inserted a breakpoint but it never eners the Event Handler..
|
|
|
|
|
It appears that we missed setting the RadioButtonList property AutoPostback to true . Without that being set, there will be no postback when the value changes.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Your problem is that you need to add controls prior to page_load for their viewstate to be restored. Viewstate is how events are handled. I believe LoadViewState is the place to do this. There are CP articles on this topic.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian makes a great point that I overlooked.
While setting AutoPostBack and assigning an id will get your event to fire, you will not be able to query the value of the radio button list. As he mentions, your control is being created too late in the cycle for it to receive its state. ViewState is restored after the page's Init cycle and before the Load cycle. You may wish to consider creating your controls either in the OnInit method or in an Init event handler.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Thanx alot Jesse / Christian!!!!!
I now create the coontrols in the Page_Init, this now saves the state and fires me events.
|
|
|
|
|
hi all
my windows is vista untimate. and i develop web on vs2005.
But have problem with debug when use IIS 7.
I choose IIS SERVER is default run. In iis i enable window authentication. But have error. "Unable to stat debugging on web server". So i were install user asp.net. But when i set security i dont see this user. Some body help me ????
|
|
|
|
|
Visual Studio 2005 has problems on Vista when not running as an administrator. Microsoft recommends that VS2005 be configured to allow it to run as an administrator (see references below). Microsoft also recommends that you install SP1 and the Vista patch for Visual Studio to help correct the incompatibilities.
As far as the inability to debug IIS, it actually has nothing to do with the ASP.NET user. Rather, it has to do with VS not having permissions to attach to the worker process. If running as VS with administrator rights doesn't help you (it never worked for me), you can manually attach the debugger. To do so, open the Debug menu in Visual Studio and select the Attach to Process item. In the modal window, select the process titled w3wp.exe and click Attach . If you don't see the w3wp.exe process, open a browser and point to the url that you wish to debug.
Additional resources:
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi Friends,
I m having a timer in my page which decreases the time,i want to close the window automatically when the time reaches end.I have used window.close() but it asks me a message whether window should be close or not.Can any one tell me how to close the window automatically.
Here is the Coding
function startTimer1(h,m,s)
{
if(document.getElementById('txt').innerHTML=="00:00:00")
{
alert("Your time is Over,Now the Application is going to close");
//self.close();
window.close();
return false;
}
var today=new Date();
if(h=="0" && m=="0" && s=="0")
{
h=00;
m=01;
s=00;
}
else
{
if(s=="00")
{
s=59;
if(m=="00" && h!="00")
{
h=parseInt(h)-1;
m=59;
}
else if(m!="00" && h=="00")
{
m=parseInt(m)-1;
}
else if(m!="00" && h!="00")
{
m=parseInt(m)-1;
}
else if(s=="00" && m=="00")
{
if(h!="00")
h=parseInt(h)-1;
}
}
else
s=parseInt(s)-1;
}
// add a zero in front of numbers<10
h=checkTime(h);
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTimer1('+h+','+m+','+s+')',1000);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
|
|
|
|
|
You can't.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The best that you can do is call window.close and have the user answer the prompt. Modern browsers will not allow you to close the browser window without user consent as the browser belongs to the user, not to your application.
The one exception, if memory serves me, is opening a modal popup window in Internet Explorer. I would recommend that you steer clear of this, if possible, as it relies on browser specific behavior. Not only will it bind your application to IE, but future versions of IE are not guaranteed to support it.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
If you don't want to close the window just direct the user to another page, this would make the app much better for the user.
These days with tabbed browsing you could ask the user to close and it close the whole window, therefore annoying the user
|
|
|
|
|
hai Friend.
Please add window.opener='x' code before window.close
<script language="jscript" type="text/javascript">
function startTimer1(h,m,s)
{
var today=new Date();
if(h=="0" && m=="0" && s=="0")
{
h=00;
m=01;
s=00;
}
else
{
if(s=="00")
{
s=59;
if(m=="00" && h!="00")
{
h=parseInt(h)-1;
m=59;
}
else if(m!="00" && h=="00")
{
m=parseInt(m)-1;
}
else if(m!="00" && h!="00")
{
m=parseInt(m)-1;
}
else if(s=="00" && m=="00")
{
if(h!="00")
h=parseInt(h)-1;
}
}
else
s=parseInt(s)-1;
}
// add a zero in front of numbers<10
h=checkTime(h);
m=checkTime(m);
s=checkTime(s);
var timerText=h+":"+m+":"+s;
document.getElementById("<%=txtTimerId.ClientID%>").innerText=timerText;
if(timerText =="00:00:00")
{
alert("Your time is Over,Now the Application is going to close");
/// This is the Code I added here;
window.opener='x';
window.close();
return true;
}
t=setTimeout('startTimer1('+h+','+m+','+s+')',1000);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
|
|
|
|
|
a window can be closed using javascript if and only if it has been opened by javascript i.e. POPUP windows
Ashish Sehajpal
|
|
|
|
|
kindly, tell me how to handle Data Purging of previous month... I want the data of current month only...
|
|
|
|
|
Gee, if your question made sense, that would help.
Purging from where ? Why not just write your SQL, if it's a database, to return only for this month ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
We have a webservice ,and the web method has to take different arguments from xml files,and creates cache files as results.
For this I want to create a batch process so that web service has to run for all the possible conditions ,and it should save the resultant file in a cache folder.
Can anyone suggest a way to do this
|
|
|
|
|
I have developed an app that contains a web browser, i now wish to convert it to an aspx page. The problem i am having is i cannot call functions on the web page.
In my app i use:
browser.Document.InvokeScript(scriptName, parameters)
where script name is a string containing the name of the function and parameters is an array containing the variables i wish to pass into the function.
could someone please suggest how i may achieve the same result using C# code behind to call a javascript function?
I am not calling the function from a direct user response, so cant use onclick etc
Thanks for any advice you may be able to offer
|
|
|
|
|
You inject the method call into the script being generated. Obviously, your javascript does not exist until the code behind has run, so, you add javascript that calls the function when the page is loaded by the browser.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all.
I want to use google analytics on a website which has an asp.net multiview control, which in turn consists of a few child view controls.
How do I make the ga.js script work with these controls? If I do it the normal way of adding the code after the tag, it will obviously count the entire page and not each of the views that are loaded.
Any help would be appreciated.
Thanks
Marky
|
|
|
|
|
Hello,,
I am using asp.net 1.1 and crystal report 11.
reports displayed in I.E 7 correctly but when I have tested it in FireFox and opera
its missed up...
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
hi everybody,
i developed an web service with asp.net and publish it from IIS. when i call it from my local everything is ok. but try to reach from a remote computer the response become HTTP 400 BAD REQUEST, in this case i can take the content and send an error response.
how can i solve this problem?
|
|
|
|
|
You need to investigaet the differences between your local and remote comp, it could be the remote doesnt have correct user access or rights, it might be something like this
|
|
|
|