2
Answers

MultiThreading Calls to a Web Service for consumption

Matthew Cox

Matthew Cox

14y
4.4k
1

I am designing a windows service that consumes a web service. I have Timer instances running that trigger callback events once timers elapse, then a particular method within the web service is consumed. Since the timers are different and have different threads, it is possible right now for multiple threads to attempt consuming the web service simultaneously, which cannot occur.
 
I know there are some know idioms and methods for attacking this process. I essentially want to queue up requests to consume the service, then let it occur as the web service becomes available each time till the queue is empty. But I'm not sure of the devices nor am I familiar with multithreading in C#
 
Any help would be great!
Answers (2)
1
Midhun T P

Midhun T P

NA 19.7k 281.1k 8y

Attachment Repeater.rar

Hi,
 
Please check the attached file. 
Accepted
1
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 8y
Try like below : 
  1. <ItemTemplate>  
  2.     <%# Container.DataItem("columnName") == "N" ? "<a href="" />" : "<asp:ImageButton ID='ImageButton1' ImageUrl='<%#Eval("Item")%>' OnClick='ImageButton1_Click' runat='server' />"  %>  
  3. </ItemTemplate>  
 
0
Raja

Raja

NA 1.7k 45.2k 8y

Manas Mohapatra

Thank you!
0
Raja

Raja

NA 1.7k 45.2k 8y

Midhun T P

Thank you so much it's working fine
0
Raja

Raja

NA 1.7k 45.2k 8y
Hi
 

Midhun T P

In data table one column have value like 
N
R
N
N
R
 
how to change the button to image button inside the repeater(button is inside the repeater) .
Is this in table we hide and show but it is in repeater
if N comes button show if R comes button to image button how to do it.
 
0
Midhun T P

Midhun T P

NA 19.7k 281.1k 8y
Hi,
 
You can use both and hide one of them according to the value in itemdatabound