I'm using a web service .asmx object to connect onto the XML datafile:

    <System.Web.Services.WebMethod()> _
    Public Function GetBlogEntries() As System.Xml.XmlDocument
        Dim doc As New System.Xml.XmlDocument
        doc.Load(Server.MapPath("history.xml"))
        Return doc
    End Function



On Oct 21, 5:15 am, Cerebrus <[EMAIL PROTECTED]> wrote:
> It's good that you chose to inform about that warning. I've noticed
> that most people ignore compile time warnings completely. There are
> already too many potential problems with code that no compiler can
> tell you about, so I find it amazing how people ignore errors that
> even the compiler can flag as potential pitfalls.
>
> On Oct 21, 9:10 am, Brock <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a webservice written and everything checks out on the WSDL.
> > Everything compiles except the page does not render anything.
> > I did notice that "End Function" does have a warning:
> > Function 'MakeDataView' doesn't return a value on all code paths. A
> > null reference exception could occur at run time when the result is
> > used. I'm populating a datagrid from data coming XML original file
> > read by the web service.
> > Here is my code hehind for the .aspx and it's HTML... Any ideas?
> > Thanks!!
>
> >     Private Function MakeDataView() As DataView
> >         Dim myDataSet As New DataSet()
> >         Using wsConvert As com.juggernautical.aWebService2 = New
> > com.juggernautical.aWebService2
> >             myDataSet.ReadXml(New
> > System.Xml.XmlNodeReader(wsConvert.GetBlogEntries()))
> >         End Using
> >         Dim view As DataView = New DataView(myDataSet.Tables(0))
> >         dgBlog.DataSource = view
> >         dgBlog.AllowSorting = True
> >         dgBlog.DataBind()
> >     End Function
>
> > But still no rendering of anything on the page.
> > Here's my HTML of the .aspx
>
> > <%@ Page Language="VB" AutoEventWireup="false"
> > CodeFile="WebServiceDG.aspx.vb" Inherits="_Default" %>
> > <[EMAIL PROTECTED] Namespace="System.Data"%>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head runat="server">
> >     <title>History</title>
> > </head>
> > <body>
> >     <form id="form1" runat="server">
> > <asp:datagrid id="dgBlog"
> >                 runat="server"
> >                 AutoGenerateColumns="False"
> >                 Font-Name="Verdana"
> >                 Font-Size="X-Small"
> >                 HorizontalAlign="Center"
> >                 ItemStyle-BackColor="#C0FFC0"
> >                 AlternatingItemStyle-BackColor="White"
> >                 Width="412px"
> >                 Height="128px"
> >                 AllowSorting="True"
> >                 BorderColor="PeachPuff"
> >                 BorderStyle="Outset"
> >                 BorderWidth="10px" CellSpacing="2" CellPadding="15"
> >             Font-Names="Verdana" ShowHeader="False">
> >       <HeaderStyle BackColor="DarkGreen"
> >                 HorizontalAlign="Center"
> >                 ForeColor="White"
> >                 Font-Bold="True" />
> >       <Columns>
> >         <asp:BoundColumn HeaderText="Blog Entry" DataField="entry" />
> >       </Columns>
> >       <AlternatingItemStyle BackColor="White" />
> >       <ItemStyle BackColor="#C0FFC0" HorizontalAlign="Left" />
> >   </asp:datagrid>
> >     </form>
> >     </body>
> > </html>- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment

You may subscribe to group Feeds using a RSS Feed Reader to stay upto date 
using following url  

<a href="http://feeds.feedburner.com/DotNetDevelopment";> 
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---

Reply via email to