473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 ListViewBillable.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 2120
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 ListViewBillable.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*********@discussions.microsoft.comwrote in message
news:02**********************************@microsof t.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 ListViewBillable.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
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
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...
1
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...
2
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...
4
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...
3
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...
6
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...
2
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.