Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About aalbetski

  • Rank

Profile Information

  • Location
    New England
  1. I need to create an HttpWebResponse usin multipart/form-data. This is what I have so far: StringBuilder sb = new StringBuilder(); sb.Append("--xyz\r\n"); sb.Append("Content-Disposition: form-data; name=\"PayloadType\"\r\n\r\nX12_270_004010X092A1\r\n"); sb.Append("--xyz\r\n"); sb.Append("Content-Disposition: form-data; name=\"ProcessingMode\"\r\n\r\nRealTime\r\n"); sb.Append("--xyz--"); byte[] Postdata = System.Text.Encoding.Default.GetBytes(sb.ToString()); Response.AddHeader("Content-Type", "multipart/form-data; boundary=xyz"); Response.AddHeader("C
  2. using SQL Server, you can query multiple databases provided that they are all on the same SQL Server. If multiple SQL servers are involved, you'd need to set them up as linked and then should be able to do the samei.e. select top 1 accountid from database1.dbo.table1unionselect top 1 accountid from database2.dbo.table1
  3. The actual issue here is not table building, but how to determine when to break an iteration at the point where a new row is to be created, or a br or hr or p tag. So breaking this down to its smallest piece, lets output each image node value and then next one then the tag. You'll see that we simply check the position of the node in the iteration and determine if is evenly divided by two, If yes, we output it, if not we output it PLUS something else, in this case a br <xsl:template match="/"> <xsl:for-each select="//image"> <xsl:choose> <xsl:when test="position() m
  4. aalbetski

    Button Response

    This may get you going. Its a complete aspx page (no code behind) just for this example. You cast the sender as the object you expect and then query its ID. This may open up all kinds of ideas to you <%@ page language="C#" %><script runat="server"> protected void Page_Load(object sender, EventArgs e) { } protected void button_Click(object sender, EventArgs e) { string sButtonId = ((System.Web.UI.WebControls.Button) sender).ID; switch (sButtonId) { case "button1": text1.Text = "button1 was pressed"; break; case "button2": text1.Text = "button2 was pressed"; br
  5. I don't know mySQL syntax, but the function in SQL Server would be this. It sets a bit (SQL Server does not have a Boolean type) to 0 (fasle) or 1 (true) if the name exists and returns the bit. I'm sure that you will have no problem modifying for mySQL create function UserExist(@uname varchar(45))returns bitbegin declare @return bit set @return = 0 --assume false if exists(SELECT username FROM users WHERE username = @uname) begin set @return = 1 end return @returnend
  6. Again, recursion can be usedTry this (Note that the CharToPad is a space, but can be anything you put in there. I used <pre> tags because they maintain whitespace in a browser where I test. <xsl:template match="/"> <pre> <xsl:call-template name="PadRight"> <xsl:with-param name="TextToPad">This Must be length of 50</xsl:with-param> <xsl:with-param name="Length">50</xsl:with-param> <xsl:with-param name="CharToPad"><xsl:text> </xsl:text></xsl:with-param> </xsl:call-template> </pre> </xsl:t
  7. Good luck with your XSLT programming journey!This will get you going to find what your'e looking for, It says, look at all the tradeIdentifer nodes and then find the one that has a child node called systemDomainName with a value of 'TID', When found, return the tradeId node value. <xsl:value-of select="//tradeIdentifier[systemDomainName = 'TID']/tradeId"/>
  8. I disagree. With a little imagination and work, you can do what you want. The data is in the XML, therefore we can get it out. I modified your XSLT just enough to total one column. You can do the rest. <!-- riga totali --><xsl:variable name="total_inizio_min" select="sum(//entry[@cat='dovute']/@ini_h) * 60 + sum(//entry[@cat='dovute']/@ini_m)" /><xsl:variable name="total_fine_min" select="sum(//entry[@cat='dovute']/@fine_h) * 60 + sum(//entry[@cat='dovute']/@fine_m)"/><xsl:variable name="total_durata_minuti" select="$total_fine_min - $total_inizio_min"/><xsl:var
  9. This may work for you, It does not require an intermediate step. It automatically determines the largest number of any one item and builds a corresponding table. It does rely on the MSXML node-set function and it is hard coded for three genres. These could be revised and streamlined if needed, but maybe this can get you started. Sample XML <table> <genre>C</genre> <genre>B</genre> <genre>A</genre> <genre>A</genre> <genre>A</genre> <genre>B</genre> <genre>C</genre> <genre>A</genr
  10. There is a way with XSLT 1.0. By using recursion and string functions you can accomplish this. Note, my example uses CDATA to allow for the ampersand in the XML data <xml id="xmlSource"> <top> <text><![CDATA[This&IsMy&Text]]></text> </top> </xml> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0"> <xsl:output method="text" /> <xsl:template match="/"> <xsl:apply-templates select="//text"/> </xsl:template> <xsl:tem
  11. The grouping technique will not work with this problem. The key will index the entire tree so it will eliminates items that you would to appear in your second root grouping, try this instead (again, I am only giving you the framework to get the data you want, its up to you to fill in the blanks) <xsl:for-each select="//root"> <xsl:for-each select="persons/person"> <xsl:if test="not(following-sibling::*/name = name)"> <xsl:value-of select="name"/> </xsl:if> </xsl:for-each> </xsl:for-each>
  12. I'm not really sure I understand your desired output. If you are trying to print a list without duplicates, the Muenchian method works fine here. (Google Muenchian for an explanation of how it works or search this forum, its been answered before)If I've misunderstood your problem, please enlighten me by showing what your desired output should look like, the following will produce this: AntBobMark <xml id="xslStyle"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0"> <xsl:key name="PName" match="
  13. found at: http://forums.techguy.org/web-design-devel...lines-wrap.html<style>pre{white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */white-space: -pre-wrap; /* Opera 4 - 6 */white-space: -o-pre-wrap; /* Opera 7 */white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */word-wrap: break-word; /* IE 5.5+ */}</style>
  14. aalbetski


    IE has the ability to create a TextRange object and copy and paste using the clipboard. Don't know about the other browsers. You can also set the contentEditable property to true and it does all the work <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html> <body> <div contentEditable="true"> Select a word and drag it around </div> </body></html>
  • Create New...