|
The problem here is that you're trying to read from / write to the Console within a Service.
This is NOT possible.
Write to a file instead.
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
Yes it has resloved the problem. Thanks all of you.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Hi mates,
I have one textbox and one button. How can I use javascript not to trigger the buttons click event when the
enter key is pressed inside textbox?
<asp:TextBox ID="txtSearch" runat="server" AutoPostBack="true"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Search" OnClientClick="window.open'TKSRCH.aspx','search','width=900,height=500,left=400,top=350,toolbar=0,status=0,resizable=0,')"/>
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
function onKeyPress()
{
return event.keyCode == '13' ? false : true;
}
<asp:TextBox ID="txtSearch" runat="server" AutoPostBack="true" onkeypress="onKeyPress()"></asp:TextBox>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks for you quick reply.
when i press button, a pop up window will show.
when i enter key in textbox, a pop up will not show.
how to put that code in here
return event.keyCode == '13' ? false : true;
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
modified on Sunday, January 23, 2011 9:24 PM
|
|
|
|
|
Just put it in your OnKeyPress() method. (I'll leave it to you to figure out where)...
if( event.keyCode == '13' ){ return false; }
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hi
I need to send a large number of emails as newsletter in website using SMTP protocol. The barrier is the server runs out of memory and raises an exception when emails count is large. I use a loop that iterates through an array of emails and send them. Is there any method that can mitigate this constriction. emails count is more than 100000.
|
|
|
|
|
If you are working for a website with 100,000+ subscriptions to a newsletter, you probably work for a website that should have it's own smtp system setup to deal with this. If it doesn't, I'm a little concerned that this "newsletter" you speak of is really more of a "spamletter"...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
If the server is running out of memory than there isn't much you can do. Even if you dispose of the objects the GC is non-deterministic so it may not free any memory in time to prevent the problems. You could try multi-threading but it would still face the same memory constraint. Another options if available is to use two, or more, SMTP servers. Sending this many emails at once would be better handled by a bulk email service.
Also sending out that many emails at once you are risking your domain being blacklisted as a spammer.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Is there a way to make sending emails slower ? For example make it take 1 hour or more to send emails to alleviate the burden. Asynchronous or some sort of that technique .
|
|
|
|
|
You can always create a service the will send so many emails per hour. You are in complete control of the code.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I know , I wanna ask "is it helpful to invoke Sleep(milliSeconds) function in the body of the loop to mitigate this problem ? " Or another technique should be used ? for example creating threads or invoking functions asynchronously ?
|
|
|
|
|
Never, ever use Sleep to block processing for a period in time. It's a poor design choice.
|
|
|
|
|
Can you give me a pragmatic way to send emails slowly to compensate for lack of server resources ?
|
|
|
|
|
If you need to send that many emails, you need to run the application on a separate server (actually it should be from several servers). Never attempt to use the web server to do this because you will always be competing with HTTP traffic (plus, it's a good idea to have the SMTP protocol on a different server to the one running the HTTP protocol. Try to keep your resources separated out for security purposes).
|
|
|
|
|
For some reasons we need to countenance our current server configuration with limited resources.
So we don't expect ideal. The delay is not a problem even if it takes 3 hours to send them. We can run the send operation when the site traffic is on the wane.(e.g. 3 AM) What do you think then ?
Thanks Regards
|
|
|
|
|
I just asked for a solution matching my current configuration ?
|
|
|
|
|
hi
is there any way to print to DataMax printer Through her driver
using asp.net in the client side ?
thanks in advance
|
|
|
|
|
You can't specifically select a printer from ASP.NET. If the user has the printer configured and available then they can choose to print to it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I was trying to get a gridview and a set of text boxes .side by side (Left to Right-Parallel) in a Row.
This renders fine - in IE,Firefox and Opera.How ever in google chrome the text boxes are rendered below the grid (top down -instead of side by side).
can any one advise on this.where could i be going wrong ?
<table align="left">
<tr align="left">
<td align="left" >
<fieldset style=" color: Black; width:621px; border-color: DarkGray">
<table>
..... A gridview
</table>
</fieldset>
</td>
<td >
<fieldset style=" color: Black;width:485px; border-color: DarkGray">
<table style="width: 490; font-family: Calibri; font-size: medium">
..... Some text Boxes
</table>
</fieldset>
</td>
</tr>
</table>
|
|
|
|
|
Table layouts are antiquated and slow rendering, try using div instead. Also, inline styles is asking for maintenance headaches. Put them in a separate file and you can target your layout to specific browsers and situations.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Converted the Table to Div - that doesn't work.This doesn't work in IE,FF as well as Opera.
|
|
|
|
|
Would you like to show how you have restructured using divs.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
<Div align="left">
<tr align="left">
<td align="left" >
<fieldset style=" color: Black; width:621px; border-color: DarkGray">
<Div>
..... A gridview
</Div>
</fieldset>
</td>
<td >
<fieldset style=" color: Black;width:485px; border-color: DarkGray">
<Div style="width: 490; font-family: Calibri; font-size: medium">
..... Some text Boxes
</Div>
</fieldset>
</td>
</tr>
</Div>
|
|
|
|
|
remove fieldset...then I think it will work..why you are using fieldset..?? whatever attribute you want to apply...use them in div itself...
HELLO GUY
|
|
|
|