Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

XmlDataSource & XPATH & DataList

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pelegk1 - 23 Jul 2007 23:28 GMT
i am using the XmlDataSource +DataList to get xml
and in the aspx page itself to extract data i do for exmlae:
<%#XPath("LogoBg/text()")%>
what i want to do is :
Dim index As Integer =
XmlDataSource1.GetXmlDocument.SelectNodes("MainPage/ParentsTip").Count
       index = rand.Next(index)
       parentTipText =
XmlDataSource1.GetXmlDocument.SelectNodes("MainPage/ParentsTip").ItemOf(index).InnerText

which today i do in the ASPX.VB page
and i want it (if possible)  to be done in the aspx page itself
is it possible?
thnaks in advance
peleg
Manish Bafna - 24 Jul 2007 02:08 GMT
Hi,
yes it is possible.
There are two types of coding style in ASP.NET.
[1]Inline Coding and [2]Code Behind
Presently you are using Code Behind style.
When u provide Design part code and Logic part code within a single file
called as ASPX,then it is INLINE ,where as
When u provide Design part code within ASPX file and Logic part code within
DLL file, then it is 'CODE BEHIND'.
AND

PROBLEMS WITH INLINE:-

INLINE doesnot support parallel Development of Designing part and Logic part
because single file has to be shared by the WebDesigner and WebDeveloper.
So,This leads to TIME CONSUMPTION.
and also
INLINE doesnot provide SECURITY for Logic part.

CODEBEHIND will overcome all the sbove problems of INLINE.
In asp.net INLINE is used only for migration purpose.
Below link further illustrates how you can write Inline and Code Behind in
ASP.NET
http://www.codeproject.com/aspnet/InlineCodeVSCodeBehind.asp?df=100&forumid=1003
99&exp=0&select=997793

Signature

Hope this answers your question.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

> i am using the XmlDataSource +DataList to get xml
> and in the aspx page itself to extract data i do for exmlae:
[quoted text clipped - 11 lines]
> thnaks in advance
> peleg

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.