Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2007, 02:57 AM
Authorized User
 
Join Date: Mar 2007
Location: Dubai, dubai, United Arab Emirates.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.NET COntrols inside XSLT

how to use the asp:button control inside the XSLT and then call a function

I Love XML and family
__________________
I Love XML and family
Reply With Quote
  #2 (permalink)  
Old March 22nd, 2007, 03:13 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

XSLT has no concept of ASP.NET, you will have to explain exactly what you are trying to achieve.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old March 22nd, 2007, 03:31 AM
Authorized User
 
Join Date: Mar 2007
Location: Dubai, dubai, United Arab Emirates.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

actually i want to select some info from XML file and the display that into HTML table format to the users, and each row having a button for Booking, when user clicks that button then an automatically email should be sent to the client.

I Love XML and family
Reply With Quote
  #4 (permalink)  
Old March 22nd, 2007, 04:08 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT transforms an XML document to another XML or HTML document, based on instructions in the stylesheet. The HTML output can contain anything you like (it doesn't have to be standard or valid HTML). If you want to generate dynamic HTML, then you can. If you need help with that, then please show an example of the HTML you want to generate. If you want help designing the HTML, then this isn't the right forum.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #5 (permalink)  
Old March 22nd, 2007, 05:00 AM
Authorized User
 
Join Date: Mar 2007
Location: Dubai, dubai, United Arab Emirates.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

actually i did all the things only part is how to send the email in XSLT, should i use the Extention Object or what else. obviously as i already told here is a button when user will click on that button then email script should be run.

I Love XML and family
Reply With Quote
  #6 (permalink)  
Old March 22nd, 2007, 06:33 AM
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

see:

http://www.dotnetspace.com/articles/...ng-emails.html

for sending emails in asp.net



Reply With Quote
  #7 (permalink)  
Old March 22nd, 2007, 06:41 AM
Authorized User
 
Join Date: Mar 2007
Location: Dubai, dubai, United Arab Emirates.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:asp="remove"
    xmlns:SEmail="urn:SEmail" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schemas.microsoft.com/intellisense/ie5">
<xsl:output method="html" indent="yes" />
<xsl:param name="chkIDate" />
<xsl:param name="chkODate" />

<xsl:template match="/">
<html>
<head>
</head>
<body>
    <xsl:apply-templates />
</body>
</html>
</xsl:template>

<xsl:template match="bookingMain">
  <table width="800" border="1" bordercolor="#0000cc" ID="Table2" cellpadding="0" cellspacing="0">
 <tr>
   <td colspan="9" height="6" bgcolor="#000099"></td>
 </tr>
 <tr bgcolor="#ccccff" class="tdfont">
   <td>Service #</td>
   <td>Client Name</td>
   <td>Booking Ref.</td>
   <td>Invoice</td>
   <td>Cost</td>
   <td>Persons</td>
   <td>Amount</td>
   <td>Balance</td>
   <td>Book</td>
   </tr>
  <xsl:apply-templates select="//bookingDetails[concat(substring-after(substring-after(bookDate,'-'),'-'),substring(substring-after(bookDate,'-'),1,2),substring-before(bookDate,'-')) &gt;= concat(substring-after(substring-after($chkIDate,'-'),'-'),substring(substring-after($chkIDate,'-'),1,2),substring-before($chkIDate,'-')) and concat(substring-after(substring-after(bookDate,'-'),'-'),substring(substring-after(bookDate,'-'),1,2),substring-before(bookDate,'-')) &lt;= concat(substring-after(substring-after($chkODate,'-'),'-'),substring(substring-after($chkODate,'-'),1,2),substring-before($chkODate,'-'))]" />
</table><p />
</xsl:template>

<xsl:template match="bookingDetails">
 <tr>
   <td><xsl:value-of select="service" /></td>
   <td><xsl:value-of select="clientName" /></td>
   <td><xsl:value-of select="bookingRef" /></td>
   <td><xsl:value-of select="invoice" /></td>
   <td><xsl:value-of select="cost" /></td>
   <td><xsl:value-of select="pax" /></td>
   <td><xsl:value-of select="amount" /></td>
   <td><xsl:value-of select="balance" /></td>

       <td><input type="submit" name="btnEmail" value="Book" onclick="SEmail:SendMail(balance)" runat="server" ID="Submit1"/></td>
   <td>

   </td>


   </tr>
  </xsl:template>
</xsl:stylesheet>


here i am calling the function through Extention Objects to edn the email which is giving error, but i know this is wrong way, if there is any other solution then plz let me know


I Love XML and family
Reply With Quote
  #8 (permalink)  
Old March 22nd, 2007, 07:07 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You are totally confused about the processing model, although it's possible to send an email whilst transforming a document it's a very strange thing to do. Surely you want an email sent when the user interacts with the HTML?

As Michael Kay pointed out this is not and XSLT question but an ASP.NET one.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #9 (permalink)  
Old March 22nd, 2007, 07:15 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If your XSLT is creating HTML that doesn't work, you have an HTML problem not an XSLT problem. The HTML would fail in exactly the same way if you created it directly using a text editor. Would you then ask your question in a forum for the text editor?

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get to controls inside DataList? rsearing ASP.NET 2.0 Basics 1 March 1st, 2007 09:14 AM
ASP.Net Web Server Controls inside XSLT russmack XSLT 2 December 14th, 2006 10:02 AM
find all the controls inside any table amartya_mandal ASP.NET 1.0 and 1.1 Professional 10 October 24th, 2006 08:35 AM
refresh other form inside frame. (ASP.NET C#) richie86 ASP.NET 1.0 and 1.1 Basics 1 December 1st, 2005 02:18 PM



All times are GMT -4. The time now is 02:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.