|
Hi,
i need a way to keep a thread alive, after the client has got the final Response.
The actual problem is, that a webpage on my server is being called by a "far-away" client (service), and this client will timeout in, say 2 minutes. The problem is, I need to download some 12 pictures without the service to timeout, and this takes more than 2 minutes. So I need to run some kind of an background task, and give the client the go signal "DATA OK", so the client thinks that the process is finish.
I have tried some technics, like the normal threading:
Thread t = new Thread(new ThreadStart(DoWork));<br />
t.Start();
But this thread seems to be disposed/killed when the client gets the last response.
So I tried this:
ThreadPool.QueueUserWorkItem(new WaitCallback (DoWork),obj);<br />
This works far better than a normal Thread, as it lives a bit longer than the other model, but it is also killed, before all work is done.
Please say that one of you programmingfreaks ( ) ) have a solution for my problem.
Best regards
Gunnar Hansen
|
|
|
|
|
Hi Friends...
How can Encrypt the asp.net2.0 code?
Is there any encrypting tool?
Thanks all
...
Nour Abdel- Salam
|
|
|
|
|
Perhaps you could clarify what it is you want to do. Encrypt the code-behind, the markup, what?
If you precompile your app everything is placed into assemblies and the aspx portion are just placeholders.
only two letters away from being an asset
|
|
|
|
|
hi friend
I want to encrypt the .vb and the .aspx code
regards
|
|
|
|
|
VB is already encrypted, at least unintelligible
You can use obfuscation for the code behind and as I mentioned compiling your app cause placeholder aspx pages.
only two letters away from being an asset
|
|
|
|
|
Hi everybody
I have two listboxes.
I have set the selectmode to multiple
but when i select multiple items from listbox1, and then clcik ADD button, only one item is getting added
How can i add all the selected items at a time
I am using
Protected Sub btnAdd_ServerClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.ServerClick
Dim licCollection As ListItemCollection
licCollection = New ListItemCollection()
Dim intCount As Integer
For intCount = 0 To lstAllAccounts.Items.Count - 1 Step intCount + 1
If (lstAllAccounts.Items(intCount).Selected = True) Then
licCollection.Add(lstAllAccounts.Items(intCount))
End If
Next
Dim intCount1 As Integer
For intCount1 = 0 To licCollection.Count - 1 Step intCount + 1
lstAllAccounts.Items.Remove(licCollection(intCount1))
lstAccountAccess.Items.Add(licCollection(intCount1))
Next
End Sub
thanks
|
|
|
|
|
remove the part 'Step intCount + 1 in the second loop. it will work
|
|
|
|
|
I'm using Visual Studio.Net 2003, Asp.Net1.1.
I have a datalist bound from a database and loaded with some Names.
I want to fire an "onClick" event when I select an element from the datalist.
How can I do that from the HTML code.
|
|
|
|
|
Reposting it without the URGENT, that may help.
only two letters away from being an asset
|
|
|
|
|
yeah, smart, huh
|
|
|
|
|
Create a control in your datalist template with the onclick client event and use databinding expression to assign the value that is displayed and/or passed to the event.
only two letters away from being an asset
|
|
|
|
|
sorry, guys I meant a listbox...that wasn't very smart
|
|
|
|
|
u know what, that's a good idea thnx
|
|
|
|
|
Hi!
How can i update the web.config file from asp.net?
Thanks.
|
|
|
|
|
|
Thanks.
I have read and written custom configuration sections programming in windows applications. But it fails to update the web.config.
I may review these further.
Thank you once again.
|
|
|
|
|
90% of my web development is in dynamic user controls (ascx). Some user controls have Ajax controls and another not.
What I do about ScriptManager? Each ascx will have ScriptManager inside, or I need create just once in Page level, then all the ascx will use this?
Another problem is: some user controls does not use Ajax, and in some situations one page can be filled with only non-ajax controls. The presence of ScriptManager will affect the performance/download times in this cases (considering what I will add the ScriptManager in page level)?
Regards
Engaged in learning of English grammar
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.(John 3:16)
|
|
|
|
|
Use a ScriptManagerProxy in your user controls where appropriate but you will still need to have one ScriptManager at the page level.
only two letters away from being an asset
|
|
|
|
|
Thanks, Mark
Engaged in learning of English grammar
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.(John 3:16)
|
|
|
|
|
Requirement to develop touch screen application for Leave management System for MNC company. The number of LCD Monitor will be 4 to 6.
For this case UI can be developed uusing windows Form or ASPX page. Which one is better and why.. Anybody have knowledge ???/
chaks,
|
|
|
|
|
I'm building the proverbial "Address" control for our site. I don't want to hard-code the style attributes, but instead allow the developer to control the Styles for the Address Control just like the GridViews. However, even though I have a public proeprty of say "LabelStyle" that's of type "System.Web.UI.WebControls.Style", everytime I load it in the designer the designer complains that there is no such property on "System.Web.UI.UserControl". However, I DO see the element in the markup!
<uc1:AddressControl ID="AddressControl1" runat="server">
<LabelStyle CssClass="textFontLabel" />
<EditorStyle CssClass="textFont" />
</uc1:AddressControl>
How can I get this to work properly? Or can this not be done with UserControls? Do I need to use a CompositeControl?
|
|
|
|
|
If you want to make it work with the designer, you'll have to use a custom control (CompositeControl) instead as the design-time support for the usercontrol is limited in VS, it always looks at the base class UserControl to parse any nested elements you define in your user control.
|
|
|
|
|
I have a an aspx page with a MultiView. In one of the views there is an iFrame where another page is loaded and the other views just have simple html (the default view is one of the simple html ones). When I first load the page in IE everything works fine, Session_Start fires and the page loads. However, with Firefox and Opera Session_Start is fired at least twice, sometimes three times and I cannot figure out why this is happening. I tried making a session variable that gets checked in Session_start to skip the code when it fires a second time, but it seems like the first session starts and stops rapidly then another is started. Any idea why this is happening?
|
|
|
|
|
Ok, it seems as though this was happening because the page got redirected before it even loaded the first one and for some reason the first session starting wasn't good enough.
|
|
|
|
|
I want set properties to a WebControl via Reflection. The corresponding code snippet is something like this:
public void SetProperty(Control control, string propertyname, string propertyvalue)
{
Type type = control.GetType();
System.Reflection.PropertyInfo pi = type.GetProperties(propertyname);
object value = Convert.ChangeType(propertyvalue, pi.PropertyType);
pi.SetValue(control, value, null);
}
It works for most cases, but for special types like Unit or Color (Width or ForeColor for example), I get an Exception. I made some ifs for a few types so that I convert/parse them specifically to the type needed. But this way the code is quite ugly and is not guaranteed to work all the time. Anyone else know a better solution?
|
|
|
|