473,625 Members | 3,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How web control can be updated via child thread.

Hello All,
My web Client is using a COM component with connection point enabled.my
client is getting call back from this component.now I have to update a
text control in handler of this callback.but my control is not
updating.can any body tell me how can i update textbox when i get a
thread event .

Thanks & Regards
Pallaw

Dec 26 '06 #1
2 1199
Hi...

I am not sure about the exact senario...
But you can not push any thing to your client...
rather you have to pull....
that is after the call back event... save the desire stuff in
session....
and put a javascript timer in your asp.net application.... and submit
the page after some time...
and in postback do update the stuff that you require.....
Hope this will work....

Thanks

Masudur
kaz Software Ltd.
www.kaz.com.bd
On Dec 26, 10:24 am, "pallaw" <pallaw...@yaho o.comwrote:
Hello All,
My web Client is using a COM component with connection point enabled.my
client is getting call back from this component.now I have to update a
text control in handler of this callback.but my control is not
updating.can any body tell me how can i update textbox when i get a
thread event .

Thanks & Regards
Pallaw
Dec 26 '06 #2
Hi ,

Thanx Masudur for your reply.
It will be helpful if you can send me an example code.
Let me make my question more clear.

I have written a C# 2.0 web application which is getting Asynchronous
messages from a call back (This CallBack is an event exposed by a COM
component). To handle this callback event, I have created a delegate.
In Event handler of that delegate

I am receiving a message from call back and I want to show that message
on Text box on Web page as soon as I get message from call back event.
For Your reference I am giving you some code snippets here:

// Code snippet

using System;
using System.Data;
using System.Configur ation;
using System.Collecti ons;
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;
// reference of COM Component
using AgentController Lib;

public partial class RunTestCase_Sam ple : System.Web.UI.P age
{
// creating Object of COM Component
AgentController CompClass objAgent = new AgentController CompClass();
protected void Page_Load(objec t sender, EventArgs e)
{
// creating delegate for asynchronous event
objAgent.SendCa llBack2Client += new
_IAgentControll erCompEvents_Se ndCallBack2Clie ntEventHandler( objAgent_SendCa llBack2Client);
string testCases ="C:/TestCases/MMF_TC1";
//passing testcases to SendTC Method
objAgent.SendTC (testCases);
}

// this is call back event handler
// this call back occurs asynchronously once it returns result
value .
void objAgent_SendCa llBack2Client(s tring Result)
{
// getting value in Result variable and showing it on
TextBoxShowResu lt
TextBoxShowResu lt.Text += Result;
}
}

Now here when I am assigning Result to TextBoxShowResu lt, it is not
reflecting on web page.

The reason may be the creation of secondary thread while calling of the
function objAgent_SendCa llBack2Client.

I searched the solution for this problem in the forums and I found that
AJAX may help me out from this problem .

I am novice to this AJAX technology so any help will be appreciated.

Regards,

Pallaw


Masudur wrote:
Hi...

I am not sure about the exact senario...
But you can not push any thing to your client...
rather you have to pull....
that is after the call back event... save the desire stuff in
session....
and put a javascript timer in your asp.net application.... and submit
the page after some time...
and in postback do update the stuff that you require.....
Hope this will work....

Thanks

Masudur
kaz Software Ltd.
www.kaz.com.bd
On Dec 26, 10:24 am, "pallaw" <pallaw...@yaho o.comwrote:
Hello All,
My web Client is using a COM component with connection point enabled.my
client is getting call back from this component.now I have to update a
text control in handler of this callback.but my control is not
updating.can any body tell me how can i update textbox when i get a
thread event .

Thanks & Regards
Pallaw
Dec 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
2969
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and provide an open TD with a DIV in it for the content of this formlet. (The DIV is for DHTML to hide and show the content) I've created a web page showing step by step the two problems I'm encountering. This problem is much easier to see than it...
5
4082
by: Barry Carr | last post by:
Hi, I've created a composite custom web control and a ControlDesigner descendant to render the control a design time. The child controls are public properties of composite control and as such the child controls appear in the property inspector as sub-properties of the main control and can be manipulated as normal at design time. If any of the properties of the parent (main) control are changed at design time the composite control is...
3
1886
by: Vinicius Bellino | last post by:
Hi All, Is there a way to change a property of an UI control, such as the enabled property of a button, in a child thread? I mean, my code runs a long process, and because I wanted to show the status in another popup window, I created a new (child) thread to run the long process and I let the main thread open a new popup with auto-refresh to show the status, using a shared Session variable to pass the current status between these...
2
2430
by: David Ricker | last post by:
I have created a PictureBox control which can have it's Image property directly bound to an image field in a database. This works perfectly for showing the images that are in the database. When I paste a new image into my control, it shows the new image and updates the image property. Problem is... It doesn't update the bound field! Any thoughts as to what I've done wrong? Any help would be greatly appreciated. The code for the...
10
2347
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a top border. Is it possible to have more than 1 style at the same level (parent node) when using a SiteMap? I want it to appear something like this and I can only find a way to either have the border on all root nodes or none at all. In...
2
3471
by: Kiran | last post by:
Hello all, I am using a tree to display stuff, and it is constantly updated, but what I have noticed is in the lowest level, there is clearly noticable cutoff of the text I place there. The cutoff is existent even if I do not update the text inside the tree constantly. It seems that the text is halfway below where it should line up. I tried placing an image to see if that would correct it, but it does not. The image is perfectly lined up,...
5
2329
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a problem in this scenario: <myprefix:mycontrol runat="server"> <%= SomeVariable %> </myprefix:mycontrol>
15
6505
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
5
3253
by: Peted | last post by:
Just some threading questions 1. in a MDI app if you have multiple child forms, does each child form run in its own thread ? Eg do you get error trying to update one control on form1 from form 2 2. if you have a timer control running on a childform, and you either a. minimize or
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.