Showing posts with label async. Show all posts
Showing posts with label async. Show all posts

Monday, March 26, 2012

Multi-threaded/Async methods with Atlas

I've recently started using ASP.NET/Atlas, I've been doing a lot of TCP work in C# with regular Windows Forms applications. All of the work I do with sockets/tcp is Async and I've been trying to get this to work to make a simple TCP Client with a terminal screen in ASP.NET using Atlas. My problem is I understand how to Invoke a delegate in Windows Forms that way you can edit controls created on the UI thread but I'm not sure how to accomplish this in ASP.NET/Atlas. I want to be able to use the Begin* methods of a socket and handle the End* method of them also. I've tried doing this with BeginRead and EndRead however when I try to set the text of a textbox from the other thread nothing happens, I can echo it out to the Debug Output. Is there a way to do this in ASP.NET?

Much thanks,
Chad

Here are a few articles that may help you:

1.http://pluralsight.com/blogs/fritz/archive/2005/02/14/5861.aspx

2.http://msdn.microsoft.com/msdnmag/issues/05/10/WickedCode/


I'll try these out, thanks a lot.

Xtek


After trying this out, I found although while useful not my goal. I'm basically trying to create a live Atlas-enabled TCP terminal. This way the text box can be edited live while the TCP Socket receives/sends data.

Thanks in advance,
Xtek


In that case you have to use some sort of a polling mechanism. You can also use sockets in JavaScript but it is a little tricky. Look at the following:

http://ajaxian.com/archives/true-javascript-sockets

But this requires a flash adapter. I have not used it so I don't have any opinions about it. I will still suggest you to go for polling.


Just what I was looking for, thanks a lot.

Xtek

Saturday, March 24, 2012

Need async post back from 1 user ctrl to another user ctrl in same master page.

Hi,

I have 3-4 web user ctrl in a Master page. Now this Master Page is being hosted by a page: ViewProductCategories.aspx. Among the userctrls on the MasterPage, I have got an ImageButton (asp:ImageButton) in one of the userctrl (ProductCtrl.ascx). Instances of ProductCtrl.ascx is being loaded dynamically on the ViewProductCategories.aspx dependng on the number of product under a category. So I have to dynamically assign the event handler for the image button click. What I want is: On the click of the asp:ImageButton (AddToCart) there should be a AsyncPostBack that only refreshes the CartCtrl.ascx which is another user ctrl on the same MasterPage, but not the other userctrls on the same master page. Situation is complex. Please let me know if any more info is needed.

Thanks,

Subhadip

Hi

You can check out this link for solution:AsyncPostBackTrigger from another user control

Please check out these linka for more information:

Trigger PostBack to an UpdatePanel from a separate UserControl?

Can I specify a UserControl custom event as a Trigger for update panel on Parent page?

Bubble Event from UserControl

Best Regards

Wednesday, March 21, 2012

need help in master pages using ajax

hi all i need an advice concerning the use of master page using async

first ive discovered that page loads using links to pages of the same master page cant be done without postback so am searching for a way to apply a way of implementing my site using master pages and ajax

so i put a master page with a header and a contant place holder next i implemented a page using mymaster page and i put within a iframe for the other pages so as those pages can be loaded asyc for the first time it seemd working just fine but when i put in the pages residing in the iframe an ajax implementation it asks for script manager so heres the prob

plz give me a good way implementing my master page without many postbacks and without using multiview

a conceptual way ........ thanks a lot

Why use masterpages if you want your pages to behave like you are using frames? You would probably be better off if you just had an aspx page with an iFrame.