A1VBCode Forums

xml programming and vb.net


http://www.a1vbcode.com/vbforums/Topic27923.aspx

By tunsten - 7/21/2009

Hello guys



I am vb.net beginner developer majorly on ASP.NET.



Can anyone help me on how to I include header information before the main body/content of an xml file, where the header will be read from the same file. For example, I want to have company's name, address, phone, document print date in the head section before displaying the list of the customers (both the header and the content is contained in single a text file).



Secondly, I want a user to select the text file (which must conform with the format to be used to display the xml file) from his/her system directory and display the path on a textbox before converting it to xml file. How do I go about it?



Your prompt response shall be highly appreciated.



Thanks.



Aweda Akeem

The Aspired .NET Developer
By paul daniel - 1/12/2010

Hi



Try this code



Dim header As Web.UI.HtmlControls.HtmlHead

header = TryCast(Me.Page.Header, Web.UI.HtmlControls.HtmlHead)

If header IsNot Nothing Then

Dim link As New HtmlLink

link.Attributes.Add("href", "~/whatever.css")

link.Attributes.Add("media", "screen")

link.Attributes.Add("rel", "stylesheet")

link.Attributes.Add("type", "text/css")

header.Controls.Add(link)

End If