473,809 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can a Webmethod reference an ListView

I'm calling the Webmethod from JS and at the end of the function I would
like to do a a ListViewBillabl e.DataBind() in the Webmethod, calling a
postback from JS is not rendering the correct results.
How would I make a Reference to it as an Object to call the DataBind in the
Webmethod VB code?

Thanks
John
Jun 27 '08 #1
2 2146
yes, but whats the point? a webmethod returns a string that the javascript
caller can use. databinding a control on the server only changes the control
tree in the request instance. it shoudl only be done if you need it to
determine the return value.
-- bruce (sqlwork.com)
"John" wrote:
I'm calling the Webmethod from JS and at the end of the function I would
like to do a a ListViewBillabl e.DataBind() in the Webmethod, calling a
postback from JS is not rendering the correct results.
How would I make a Reference to it as an Object to call the DataBind in the
Webmethod VB code?

Thanks
John
Jun 27 '08 #2
Thanks for your reply, the issue I have is that I have an onload event on
the Listview ItemSepearator I use to access direct control over the
separator. On a Listview. DataBind the events fire alternating as you would
expect, 1st one ItemDataBound then a Separator event I am calling on the
onload event, etc until all are done.

When using JS DoPostBack thru the OnSuceeded function on the completed
Webmethod, they fire sequencally, 1st all the ItemDataBound events & then
all the Separator events; rendering different results.

The result I am after is the Item Separator only renders one time instead of
all the time, which does not occur thru JS PostBack.

I just wanted to try it, but cannot figure out the syntax to do it.
Thanks
John

"bruce barker" <br*********@di scussions.micro soft.comwrote in message
news:02******** *************** ***********@mic rosoft.com...
yes, but whats the point? a webmethod returns a string that the javascript
caller can use. databinding a control on the server only changes the
control
tree in the request instance. it shoudl only be done if you need it to
determine the return value.
-- bruce (sqlwork.com)
"John" wrote:
>I'm calling the Webmethod from JS and at the end of the function I would
like to do a a ListViewBillabl e.DataBind() in the Webmethod, calling a
postback from JS is not rendering the correct results.
How would I make a Reference to it as an Object to call the DataBind in
the
Webmethod VB code?

Thanks
John

Jun 27 '08 #3

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

Similar topics

1
278
by: kids_pro | last post by:
Hi there, I try to create a webmethod in webservice by return DataView but each time I compile there is and error public DataView GetAuthor(){ ..... return ds.Tables.DefaultView; }
24
2291
by: Joseph Geretz | last post by:
Up to this point, our application has been using Windows File Sharing to transfer files to and from our application document repository. This approach does not lend itself toward a secure environment and so we are in the process of imposing a WebService gateway between our application client and the repository. (As a starting point, the WebService won't be a richly featured application server; business rules are still implemented in the...
1
2105
by: needin4mation | last post by:
Hi, I took the ListView control from the toolbox, put it on the form, and when I tried to compile this (from my constructor): listViewFiles.Columns.Add("Source",-1,HorizontalAlignment.Left); I get an object reference not set error. The control on the form has this created by VS: private System.Windows.Forms.ListView listViewFiles;
2
3547
by: Marty Cruise | last post by:
I need to create a reference to the sender of an OnMouseDown event. Here is my code: Dim myView As New ListView AddHandler myView.MouseDown, AddressOf viewMousedown Sub viewMousedown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Dim myListView as Listview
4
4652
by: MattBell | last post by:
I've tried to search for an answer to this without much success, and I think it's probably a common thing to do: I have a web service I want to accept an XmlDocument as an argument which conforms to a specific XSD that is defined. Right now when I declare XmlDocument as my argument, it puts the old xml:any type in. How do I change that to reflect the XSD that I'm looking for? Thanks for any Help!
3
2970
by: Khurram | last post by:
Hi, Firstly, I will apologise now if I have posted in the wrong discussion group. Please let me know if I have for future reference. Below is the code to a WebMethod that is querying an Access 2003 database, saving the results as a dataset and returning the dataset. public DataSet findAAPAssessment(string assessmentID) {
6
3352
by: John Kotuby | last post by:
Hi all.. In a VS2005 ASP.NET 2.0 website application I am using a regular HTML anchor (actually a number of them) in a page that produces Excel output because a server control is really not needed here. I am using a relative path in the anchor such as: <a href= "/Common/ListView.aspx" My understanding is that I cannot use the syntax:
2
2363
by: Andy B | last post by:
I have the following listView control on a page: <asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="PlaceHolder1"> <ItemTemplate> <dl> <dt>
1
1264
by: Alphamacaroon | last post by:
All, I have a situation where I want to expose a webmethod from a plugin that gets loaded dynamically at the startup of a windows service. The basic architecture looks like this: Assembly With WebMethod o-------o Windows Service Which Loads Plugin <-------- {Remoting} ---------IIS Since IIS will have no clue of the actual assembly with the WebMethod
0
9721
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
10633
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
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6880
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
5548
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
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
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
3860
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
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.