Jump to content

kwilliams

Members
  • Content Count

    229
  • Joined

  • Last visited

Everything posted by kwilliams

  1. I copied and pasted the revised code you provided into my SP, ran it, and it was successful. I did a count on the DB table as I ran the job, and it counted occurrences of arrows in this count pattern: 75 (initial count), 53, 26, 15, 9, 5, 3, 2, 2, 0. I manually ran the job on purpose to make sure that it was working on my side, which it did...yeah:)So I see that the next step is to add a loop for the job using the SELECT COUNT method that you noted. You've already helped me a great deal, so I don't want to request for you to write more code for me. But if you could give me an idea of how I should do it with the revised code and/or point me in the right direction, that would be great. Thanks again Reg Edit.
  2. ...also, I received an error when I applied your suggested changes to my SP. Here's what I have:CREATE PROCEDURE [dbo].[spRemoveArrow]ASBEGINDECLARE @arrow binary(16)SELECT @arrow = TEXTPTR(details)FROM tblTableNameWHERE (details LIKE '%& #9658;%')UPDATETEXT tblTableName.details @arrow (PATINDEX('►', details) - 1) 7 '-'GOPlease Note: I still kept the space is still between "&" and "#" to allow code to come through, but there's no space in my code.and here's the error message that I received:Error 170: Line 9: Incorrect syntax near '('.Any additional suggestions would be very helpful. Thanks for your time.
  3. Ok, I'll give that a try. I actually already posted it in the first post in this thread. The example is at the bottom of the page.P.S. I saw that bulk copy code as something to do with running the stored procedure, but since I'm going to run it within a scheduled DTS package, I didn't see the need for it. I'll await your response on the MS example code. Thanks.
  4. I did that because that's how I had seen it done in the sample. So you're saying that I should instead do the following: SELECT TEXTPTR(details) FROM... ? if this is wrong, please let me know how I can go about fixing it. Ok, I understand that now. And I'll use the "PATINDEX('& #9658;', details) - 1" method you referenced, as I don't know before-hand where the arrow occurs for each record. No, I want it to loop through all of the records in the table. The MS example has the following code at the beginning of the SP:USE DATABASENAMEGOEXEC spRemoveArrow 'DATABASENAME', 'select into/bulkcopy', 'true'...and this and the end of the SP:EXEC sp_dboption 'DATABASENAME', 'select into/bulkcopy', 'false'GOWould these make it loop through all of the records, or is there something else I should use? Yes, I'm currently using SQL Server 2000. We're going to upgrade to 2005 in the near future hopefully, but I need this solution in the meantime.Thanks for all of your help, and I hope to hear from you soon.
  5. kwilliams

    UPDATETEXT Problem

    I need to replace a few strange characters that are located in a table field that has a text datatype. My first try is to replace an arrow character (code: & #9658;) with a dash.Please Note: I had to place a space between & and # for you to to see the code of the arrow.I found a MS article on the UPDATETEXT method at http://msdn2.microsoft.com/en-us/library/a...58(sql.80).aspx...which provides the following example: DECLARE @ptrval binary(16)SELECT @ptrval = TEXTPTR(pr_info) FROM pub_info pr, publishers p WHERE p.pub_id = pr.pub_id AND p.pub_name = 'New Moon Books'UPDATETEXT pub_info.pr_info @ptrval 88 1 'b' GOI customized it to create the following stored procedure:[code]CREATE PROCEDURE [dbo].[spRemoveArrow]@arrow binary(16) ASSELECT @arrow = TEXTPTR(details)FROM tblTableNameWHERE (details LIKE '%& #9658;%')UPDATETEXT tblTableName.details @arrow NULL 7 '-'GO Please Note: I had to place a space between & and # for you to to see the code of the arrow....but I receive the following error message:Server: Msg 257, Level 16, State 2, Procedure spRemoveArrow, Line 0Implicit conversion from data type varchar to binary is not allowed. Use the CONVERT function to run this query.I've messed around with it a bit to see if I could fix the problem, but I can't figure out how to do this. If anyone could let me know what I'm doing wrong, it would be greatly appreciated. Thanks.Please Note: I had to place a space between & and # for you to to see the code of the arrow.
  6. Yes, you are correct. Sorry that I wasn't more clear. The other form fields show up behind the menu; only the select menu shows up in front. I went to several links through the Google Search you referenced, but I'm already using their solution with z-index on my menu's container, like this:#navlist { position:absolute; width:auto; margin-left:10px; margin-top:-1px; z-index:1;/* brings menu to front of content */ font-size:1.0em;}This brings the menu in front of the content on the page except for the select menu. So I'm not sure what else to do at this point. Any suggestions would be greatly appreciated. Thanks.
  7. I developed a pure CSS menu with the help of Eric Meyer's tutorial, and it works great. But in IE6 and IE7, the menu shows up *behind* the form fields below. I hope that there's a quick fix for this that I haven't been able to find. If you can help me out, that would be great. Thanks.
  8. Yes, that is what I'm having trouble with. Yes, according to the referenced article, that is what the purpose for "padding-bottom: 1001em" and "margin-bottom: -1000em". I commented them out to see what would happen, and although it did fix the overflow problem, the left column doesn't go all to way down to the footer as it should. I also tried moving those two values from "#wrapper.column" to "#screenleftnav", but it again causes the same overflow problem. Any other suggestions would be great. Thanks.
  9. This site is on a test server, so there is no link to provide...sorry.The code attached can simply be copied and pasted into an ASP.NET doc, and then displayed on several browsers to see what I'm talking about. This shouldn't at all clutter up your machine. Let me know if you have any other questions. Thanks.
  10. Thankfully, this question was answered by another forum, and I wanted to put the fixed code in this forum as well: #screenleftnav li {float:left;}#screenleftnav a {width: 117px;display:block;background-color:#99C;padding:1px 1px 1px 1px; /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left*/border-bottom:1px solid #000; /*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/} Thanks:)
  11. I created a CSS stylesheet based on this article: http://www.alistapart.com/articles/dropdowns/...and I created a 100% div height design from that with this article: http://www.webmasterworld.com/css/3333354.htmWith these referenced sites, I created a site with a header, footer, left column, center column, and a right column. It looks great in all browsers that I've tested so far, which include IE6, IE7, and Firefox. But for some reason, a few of the pages don't obey the "overflow:hidden" in IE6 and IE7. Most of them do, which is what's confusing me about it.If anyone could let me know what I'm doing wrong, I'd really appreciate it. I've included the code of a page that has this problem below. If you copy & paste the code below, and check it in each of the referenced browsers, you should get the same result. Thanks for any and all help. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <title>CSS overflow:hidden Issue</title> <style type="text/css"> /*** The Essential Code ***/ html { font-size:62.8%; margin:0; padding:0; } body { font-family:verdana, arial, helvetica, sans-serif; font-size:1.2em; margin:0; padding:0; color:#000; background-color:#FFF; empty-cells:show; min-width: 100%; /* 2 x (LC fullwidth + CC padding) + RC fullwidth */ } #wrapper { padding-left: 150px; /* LC fullwidth */ padding-right: 238px; /* RC fullwidth + CC padding 218 + */ overflow:hidden; /*padding-bottom:75px;*/ padding-bottom:575px; -padding-bottom:0px; } #wrapper .column { position: relative; height:100%; float: left; padding-bottom: 1001em; /* X + padding-bottom */ margin-bottom: -1000em; /* X */ } #content { padding: 15px 0px 0px 0px/*left*/; /* CC padding */ /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left'*/ width: 100%; background: #FFF; } #content_printerfriendly { padding: 10px 0px/*left*/; /* CC padding */ width: 100%; background: #FFF; } #right { width:218px; /*RC width */ padding-top:10px; margin-right: -100%; margin-left:20px; color:#333; background-image:url(rightcolumn_lines.gif); background-repeat:repeat; } #footer { width:100%; height:60px; text-align:right; color:#FFF; background-color:#000; clear: both; } #footer-wrapper { float: left; position: relative; width: 100%; margin-bottom: -10px; background: #000; /*** Same as body background ***/ } /*** IE Fixes ***/ * html #screenleftnav { left: 238px; /* RC fullwidth */ } * html #footer-wrapper { /*padding-bottom: 10010px; margin-bottom: -10000px;*/ padding-bottom: 50px; margin-bottom: -50px; } .leftheader { background-color:#000; color:#FFF; font-weight:bold; text-align:center; word-wrap:break-word; /* For Mozilla: Use 'zero width space' ​ to break long words */ border-top:0px solid #000; /*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/ width:120px; margin-top:3px; margin-bottom:-13px; } #screenleftnav { width: 120px; /* LC width */ padding: 0; /* LC padding */ right: 150px; /* LC fullwidth + CC padding */ margin-left: -100%; margin-top:44px; color:#FFF; background-color:#000; border-right: 3px solid #900; /*'border-right-width' 'border-right-style' 'border-right-color'*/ } #screenleftnav ul { padding:0px; /*removes indent Mozilla and NN7*/ list-style-type:none; /*turns off display of bullet*/ text-align:center; margin:15px 0px 0px 0px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/ } #screenleftnav li { float:left; } #screenleftnav a { width: 117px; display:block; background-color:#99C; padding:1px 1px 1px 1px; /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left*/ border-bottom:1px solid #000; /*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/ } #screenleftnav a:link, #screenleftnav a:visited { background-color:#99C; color:#FFF; text-decoration:none; } #screenleftnav a:hover, #screenleftnav a:active { background-color:#CCF; color:#000; } #screenheader { width:100%; border:0px;/*???*/ height:110px; width:100%; margin-top:0px; background-color:#336; /* navy blue */ } </style></head><body> <div id="screenheader"> HEADER GOES HERE </div><!-- end screenheader --> <div id="wrapper"> <div id="content" class="column"> <!-- Dynamic MainColumn --> <h1>CSS overflow:hidden Issue</h1> <br /> CONTENT GOES HERE </div><!-- end content --> <div id="screenleftnav" class="column"> <div id="leftnav_dept_links"> <div class="leftheader">Page Links</div> <br /> <ul> <li><a href="page1.aspx">Page 1</a></li> <li><a href="page2.aspx">Page 2</a></li> <li><a href="page3.aspx">Page 3</a></li> </ul> </div><!-- end leftnav_dept_links --> </div><!-- end screenleftnav --> <div id="right" class="column"> RIGHT COLUMN GOES HERE </div><!-- end right --> </div><!-- end wrapper --> <div id="footer-wrapper"> <div id="footer"> FOOTER GOES HERE </div><!-- end footer --> </div><!-- end footer-wrapper --></body></html>
  12. I created a CSS-based menu using an unordered list based on this article: http://www.alistapart.com/articles/dropdowns/...and I created a 100% div height design from that with this article: http://www.webmasterworld.com/css/3333354.htm */My resulting stylesheet basically makes an unordered list within a <div> tag into a group of buttons. It worked great before I added the 100% div height code, but the background color is not showing up for the first list item in IE6 and IE7 (shocking, I know). It shows up fine in Firefox. The rest of the list items show up fine in all browsers. I've looked in the source code of the page, and the code appears to be correct. So I'm totally stumped. If anyone could let me know what I'm doing wrong, I'd REALLY appreciate it. I've included all of code below. If you copy & paste the code below, and check it in each of the referenced browsers, you should get the same result. Thanks for any and all help.menu.aspx <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <title>CSS List-based Menu</title> <style type="text/css"> html { font-size:62.8%; margin:0; padding:0; } body { font-family:verdana, arial, helvetica, sans-serif; font-size:1.2em; margin:0; padding:0; color:#000; background-color:#FFF; empty-cells:show; min-width: 100%; /* 2 x (LC fullwidth + CC padding) + RC fullwidth */ } #wrapper { padding-left: 150px; /* LC fullwidth */ padding-right: 238px; /* RC fullwidth + CC padding 218 + */ overflow:hidden; /*padding-bottom:75px;*/ padding-bottom:575px; -padding-bottom:0px; } #wrapper .column { position: relative; height:100%; float: left; padding-bottom: 1001em; /* X + padding-bottom */ margin-bottom: -1000em; /* X */ } #content { padding: 15px 0px 0px 0px/*left*/; /* CC padding */ /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left'*/ width: 100%; background: #FFF; } .leftheader { background-color:#000; color:#FFF; font-weight:bold; text-align:center; word-wrap:break-word; /* For Mozilla: Use 'zero width space' ​ to break long words */ border-top:0px solid #000; /*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/ width:120px; margin-top:3px; margin-bottom:-13px; } #screenleftnav { width: 120px; /* LC width */ padding: 0; /* LC padding */ right: 150px; /* LC fullwidth + CC padding */ margin-left: -100%; margin-top:44px; color:#FFF; background-color:#000; border-right: 3px solid #900; /*'border-right-width' 'border-right-style' 'border-right-color'*/ -left: 238px; /* RC fullwidth */ } #screenleftnav ul { padding:0px; /*removes indent Mozilla and NN7*/ list-style-type:none; /*turns off display of bullet*/ text-align:center; margin:15px 0px 0px 0px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/ } #screenleftnav li { display:inline; } #screenleftnav a { display:block; background-color:#99C; padding:1px 1px 1px 1px; /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left*/ border-bottom:1px solid #000; /*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/ } #screenleftnav a:link, #screenleftnav a:visited {/*THIS IS THE PROPERTY */ background-color:#99C; color:#FFF; text-decoration:none; } #screenleftnav a:hover, #screenleftnav a:active { background-color:#CCF; color:#000; } #screenheader { width:100%; border:0px;/*???*/ height:110px; width:100%; margin-top:0px; background-color:#336; /* navy blue */ } </style></head><body> <div id="wrapper"> <div id="content" class="column">PAGE CONTENT GOES HERE</div><!-- end content --> <div id="screenleftnav" class="column"> <div class="leftheader">Page Links</div> <ul> <li><a href="page1.aspx">Page 1</a></li> <li><a href="page2.aspx">Page 2</a></li> <li><a href="page3.aspx">Page 3</a></li> </ul> <div class="leftheader">Section Home</div> <ul> <li><a href="home.aspx">Home Page</a></li> </ul> </div><!-- end screenleftnav --> </div><!-- end wrapper --></body></html>
  13. I'm in the process of migrating my site from classic ASP to ASP.NET 2.0, but I need to use some of the classic ASP apps until this process is complete. I'm trying to use a XML/XSLT transformation within an ASP doc (w/JScript syntax), but I'm getting an error. This setup works fine in my ASP.NET page, and I know that the XSLT doc is proper, so I'm thoroughly confused. I've included code for all of the referenced pages below, and all of these files are located in the same directory on my machine. If anyone can let me know what I'm doing wrong, that would be great. Thanks.xmldoc.xml:<?xml version="1.0" encoding="UTF-8"?><xmldoc> <section> <title>Page 1</title> <url>page1.asp</url> </section> <section> <title>Page 2</title> <url>page2.asp</url> </section></xmldoc>xsldoc.xsl:<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <ul> <xsl:for-each select="xmldoc/section"> <li><a href="{url}"><xsl:value-of select="title" /></a></li> </xsl:for-each> </ul> </xsl:template></xsl:stylesheet>aspdoc.asp (JScript syntax):<%//Load XMLvar xml = Server.CreateObject("Microsoft.XMLDOM")xml.async = falsexml.load("xmldoc.xml") //Load XSLvar xsl = Server.CreateObject("Microsoft.XMLDOM")xsl.async = falsexsl.load("xsldoc.xsl") //Transform fileResponse.Write(xml.transformNode(xsl))%>HTML output wanted:<ul> <li><a href="page1.asp">Page 1</a></li> <li><a href="page2.asp">Page 2</a></li></ul>Error message:msxml3.dll error '80004005'The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.
  14. Thanks for the quick reply boen_robot.I added your suggested code like so:Dim args As New XsltArgumentList()If recordId_qs <> "" Then args.AddParam("record_id", "", recordId_qs)End If...and it worked great. I can't believe that I didn't figure that out on my own. I really appreciate your help. Have a good one.
  15. My site uses a XML/XSL transformation using an ASP.NET page, and I'm trying to reset one of the XSL doc's parameters depending on a querystring value (ex: default.aspx?record_id=pw). But I'm getting an error, and I'm not sure how to solve it. This is what I have so far:ASP.NET DOC 'Assign XML and XSLT docsDim strThisPage_xml As String = "/docs/xml/default.xml" 'XML doc stringDim strThisPage_xsl As String = "/docs/xslt/default.xsl" 'XSLT doc string'Declare querystring variableDim recordId_qs As String = Request.QueryString("record_id")'Create the XsltArgumentList objectDim args As New XsltArgumentList()args.AddParam("record_id", "", recordId_qs)'Assign maincolumn XML/XSLT transformation propertiesxslTransform_mc.DocumentSource = strThisPage_xmlxslTransform_mc.TransformSource = strThisPage_xslxslTransform_mc.TransformArgumentList = args RESULT:ERROR:System.ArgumentNullException: Value cannot be null.Value cannot be null. Parameter name: parameterAnd if I add the following code above the "Assign maincolumn XML/XSLT transformation properties" set of code, it works:'Declare default querystring variablesIf recordId_qs = "" Then recordId_qs = "default"End IfBut I obviously know that this isn't the correct way to solve it. I read some stuff on how to dataset, but do I need to do the same for a string? Anyway, if you could point me in the right direction, that would be very helpful. Thanks.
  16. Well, I googled "XsltArgumentList Transform Source", and I came up with a lot of great resources for what I was looking for. The one that worked for me is titled "Create ASP.NET pages from XML data", and it's located at http://articles.techrepublic.com.com/5100-22_11-1050062.html. So I just added this bit of code to the default.aspx page:'Assign maincolumn XML/XSLT transformation propertiesxslTransform_mc.DocumentSource = strThisPage_xmlxslTransform_mc.TransformSource = strThisPage_xslxslTransform_mc.TransformArgumentList = args...and the arguments were applied to the XML/XSL transformation. Next, I'll be working on implementing this solution within the MasterPage method. If anyone can give me any pointers on that, that would be great. Thanks again.
  17. I'm using the ASP.NET MasterPage method for my new site, that includes a XML/XSLT transformation. Now I'm trying to create a form with XSLT and ASP.NET that uses a XSLT paramater to change the displayed data. I found a MSDN Library item "XSLT Parameters" at http://msdn2.microsoft.com/en-us/library/dfktf882.aspx, and it works great statically. Now I'm trying to implement the same concept on my MasterPage site, but when I put this code into the content page's codebehind doc, the parameter isn't being passed back from the ASP.NET content page to the XSLT doc.I'm hoping that I won't have to move the transformation to the content page, as that would defeat the point in me creating a dynamic site by using the MasterPage method. Below I'm including the code that I have so far. Also, here are some questions that I haven't been able to answer yet:Q: How should I go about using this method with a MasterPage method (including outputting the data in the <body> tag of the document)?If I have to move the transformation from the master page to the content page, ...Q: ...is there a way to create ONE central doc that contains the transformation setup for ease of future maintenance?Q: ...is there a way to have arguments on the content's codebehind page while keeping the XML/XSL transformation on the master page?If anyone can let me know where I'm going wrong, that would be great. Thanks.**********Working static version code**********XML doc (default.xml): <?xml version="1.0" encoding="UTF-8"?><default> <item id="top">Hello</item> <item id="middle">World</item> <item id="bottom">!</item></default> XSL doc (default.xsl): <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:for-each select="default"> <xsl:value-of select="item" /><br /> </xsl:for-each> </xsl:template></xsl:stylesheet> ASP.NET doc (default.aspx): <%@ Page Language="VB" %><%@ Import Namespace="System" %><%@ Import Namespace="System.IO" %><%@ Import Namespace="System.Xml" %><%@ Import Namespace="System.Xml.XPath" %><%@ Import Namespace="System.Xml.Xsl" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> Partial Class _default Inherits System.Web.UI.Page Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim strThisPage_xml As String = "/docs/xml/default.xml" Dim strThisPage_xsl As String = "/docs/xslt/default.xsl" 'Load recordId Dim recordId_qs As String = Request.QueryString("record_id") 'Create the XPathDocument object Dim doc As New XPathDocument(Server.MapPath(strThisPage_xml)) 'Create the XslTransform object Dim xslDoc As New XslCompiledTransform() xslDoc.Load(Server.MapPath(strThisPage_xsl)) 'Create the XsltArgumentList object Dim args As New XsltArgumentList() args.AddParam("record_id", "", recordId_qs) 'Perform the transformation - pass in the parameters in the XsltArgumentList xslDoc.Transform(doc, args, Response.Output) End Sub End Class</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"></head><body> <form id="form1" runat="server"> <div> </div> </form></body></html> HTML output: <?xml version="1.0" encoding="utf-8"?> Hello<br /> World<br /> !<br /><!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></head><body> <form name="form1" method="post" action="default.aspx" id="form1"><div><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTUxMzcyMjQyN2RkH2aryQjMtUhd8XjhSLZBSbhs5W8=" /></div> <div> <!-- ***THIS IS WHERE I WANT THE OUTPUT TO BE*** --> </div> </form></body></html> **********Non-working dynamic version code**********XML doc (default.xml): <?xml version="1.0" encoding="UTF-8"?><default> <item id="top">Hello</item> <item id="middle">World</item> <item id="bottom">!</item></default> XSL doc (default.xsl): <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <script> <![CDATA[ function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } ]]> </script> <select name="selectcategory" onChange="MM_jumpMenu('parent',this,0)"><option value="" selected="true">- Select a Category -</option> <xsl:for-each select="default"> <option value="{@id}"><xsl:value-of select="item" /></option> </xsl:for-each> <select> </xsl:template></xsl:stylesheet> Master Page codebehind (MasterPage.master.vb): Partial Class MasterPage Inherits System.Web.UI.MasterPage Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Assign maincolumn XML/XSLT transformation properties xslTransform_mc.DocumentSource = "/docs/xml/default.xml" xslTransform_mc.TransformSource = "/docs/xslt/default.xsl" End SubEnd Class Master Page (MasterPage.master): <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" Debug="True" %><%@ Import Namespace="System" %><%@ Import Namespace="System.IO" %><%@ Import Namespace="System.Xml" %><%@ Import Namespace="System.Xml.XPath" %><%@ Import Namespace="System.Xml.Xsl" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head id="Head1" runat="server"></head><body> <div id="content"> <!-- Dynamic MainColumn --> <asp:Xml id="xslTransform_mc" runat="server"></asp:Xml> </div><!-- end content --></body></html> ASP.NET codebehind doc (default.aspx.vb): Partial Class _default Inherits System.Web.UI.Page Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Create the XsltArgumentList object Dim args As New XsltArgumentList() args.AddParam("record_id", "", recordId_qs) End SubEnd Class ASP.NET doc (default.aspx): <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="default.aspx.vb" Inherits="_default" title="Home Page" %> HTML output: nothing shows up. (I would hope that selecting "default.xml?record_id=top" from the drop-down menu would pull up "Hello".)
  18. Worked like a charm:#navlist { position:absolute; width:auto; margin-left:10px; z-index:1;}Thanks jamess:)
  19. The 3-column design with a header and a footer is still working great, but I'm having two related problems:1) The footer shows up at the bottom of the page in both Firefox and IE 6.0, but the left and right columns are not going all the way to the bottom in IE 6.0.2) I've created a popup menu to go with this site, but it's showing up behind the content section.I'm including my current code at the bottom of this post. If anyone can see what I need to change to make this work properly, that would be wonderful. Thanks for any and all help.default.aspx <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" Debug="True" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head runat="server"> <title>Three Column Design</title> <link rel="stylesheet" type="text/css" media="screen" href="~/docs/css/screen.css" /> <link rel="stylesheet" type="text/css" media="screen" href="~/docs/css/menu.css" /> <script language="javascript" type="text/javascript" src="/bgscripts/js/iefixes.js"></script></head><body> <div id="header"> This is the header section <div id="navlist"> <ul id="nav"> <li class="root"><a href="sectionA.aspx">Section A</a> <ul> <li class="subtab"><a href="page1.aspx">Page 1</a></li> <li class="subtab"><a href="page2.aspx">Page 2</a></li> <li class="subtab"><a href="page3.aspx">Page 3</a></li> </ul> </li> <li class="root"><a href="sectionB.aspx">Section B</a> <ul> <li class="subtab"><a href="page1.aspx">Page 1</a></li> <li class="subtab"><a href="page2.aspx">Page 2</a></li> <li class="subtab"><a href="page3.aspx">Page 3</a></li> </ul> </li> <li class="root"><a href="sectionC.aspx">Section C</a> <ul> <li class="subtab"><a href="page1.aspx">Page 1</a></li> <li class="subtab"><a href="page2.aspx">Page 2</a></li> <li class="subtab"><a href="page3.aspx">Page 3</a></li> </ul> </li> </ul> </div> </div><!-- end header --> <div id="wrapper"> <div id="screenleftnav"> This is the left column section </div><!-- end screenleftnav --> <div id="content"> This is the content section </div><!-- end content --> <div id="right"> This is the right column section </div><!-- end right --> </div><!-- end wrapper --> <div id="footer"> This is the footer section </div><!-- end footer --></body></html> screen.css /* Main HTML Properties */html { font-size:62.8%; margin:0; padding:0; height:100%;}body { font-family:arial, helvetica, sans-serif; font-size:1.2em; margin:0; padding:0; height:100%; /* this is the key! */ color:#000; background-color:#FFF;}#wrapper { position:relative; /*makes menus 100% height*/ min-height: 100%; margin-top:-10px; -margin-top:0px;}* html #wrapper { height: 100%;}#header { width:100%; background-color: #FFF; border:0px;/*???*/ height:122px; width:100%; margin-top:0px;}#content { position:static; margin:0px 204px 0px 129px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/ border:0; padding-top:10px;}#right { position:absolute; right:0; top:0px; padding:0; width:194px; height:100%; min-height: 100%; color:#333; background-image:url(/images/gif/rightcolumn_lines.gif); background-repeat:repeat; border:0;}#footer { position: relative; margin: 0px auto 0 auto; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/ background-color:#000; width:100%; height:60px; text-align:right; color:#FFF;}#left p { padding:0 10px;}#right p { padding:0 10px;}p.top { margin-top:20px;}/*Left Navigation Properties */#screenleftnav { position:absolute; left:0; top:0px; padding:0; width:120px; height:100%; min-height: 100%; margin-top:40px; -margin-top:30px; color:#FFF; background-color:#000; border-right: 3px solid #900; /*'border-right-width' 'border-right-style' 'border-right-color'*/}#screenleftnav ul { padding:0px; /*removes indent Mozilla and NN7*/ list-style-type:none; /*turns off display of bullet*/ text-align:center; margin:15px 0px 0px 0px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/}#screenleftnav li { display:inline;}#screenleftnav a { display:block; background-color:#99C; padding:1px 1px 1px 1px; /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left*/ border-bottom:1px solid #000;/*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/}#screenleftnav a:link, #screenleftnav a:visited { color:#FFF; text-decoration:none; }#screenleftnav a:hover, #screenleftnav a:active { background-color:#CCF; color:#003;} menu.css /*Menu Properties*/#navlist { width:auto; margin-left:10px;}#nav, #nav ul { /* all lists */ padding: 0px; margin:0; list-style: none; line-height: 1;}#nav a { display:block; width:auto; text-decoration:none; font-size:1.0em; padding:2px 0px 2px 2px; /*'padding-top' 'padding-right' 'padding-bottom' 'padding-left'*/ color:#FFF;/* white */}#nav a:hover,#nav a.hover { color:#000;/* black */ background-color: #CCF; /* light blue */}.root { border:1px solid #306; /*'border-width' 'border-style' 'color'*/ text-align:center; background-color: #99C; /* light blue */ color:#FFF;/* white */}.hassub { background: url(/images/arrows.gif) no-repeat right;} #nav li { /* all list items */ float: left; width: 110px; /* width needed or else Opera goes nuts */}#nav li ul { /* second-level lists */ position: absolute; background-color: #99C; /* light blue */ width: 110px; left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */ border: 1px solid #306;/*'border-width' 'border-style' 'color'*/ text-align:left; *margin-left:-46px; /* for IE5.5+ only */ margin-top:3px; color:#FFF; }.subtab { border-bottom:1px solid #FFF;/*'border-bottom-width' 'border-bottom-style' 'border-bottom-color'*/}#nav li ul ul { /* third-and-above-level lists */ margin: -1em 0 0 92px; *margin-left: 92px; /* for IE5.5+ only */}#nav li:hover, #nav li.hover { /* List Hover Properties */ background-color: #CCF; /* light blue */ display: inline;}#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul { left: -999em;}#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */ left: auto;} iefixes.js (makes it work in IE 6.0) <!--//--><![CDATA[//><!--sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } }}if (window.attachEvent) window.attachEvent("onload", sfHover);//--><!]]>
  20. Ah, I've figured it out:)This is the revised code that works great, for anyone that would like to see it. Thanks again for your help ste! <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" ><head><title>One Hundred Percent Height Divs</title><style type="text/css" media="screen">html, body {margin:0;padding:0;height:100%;}#wrap {position: relative;min-height: 100%;}* html #wrap {height: 100%;}#header {background-color: #EAEAEA;border:1px solid #333;height:154px;width:100%;}#left {position:absolute;left:0;top:0px;padding:0;width:200px;height:100%;min-height: 100%;color:#333;background:#eaeaea;border:1px solid #333;}#content {position:static;margin-left:220px;margin-right:220px;margin-bottom:20px;color:#333;background:#ffc;border:1px solid #333;padding:0 10px;}#right {position:absolute;right:0;top:0px;padding:0;width:200px;height:100%;min-height: 100%;color:#333;background:#eaeaea;border:1px solid #333;}#footer {position: relative;margin: -60px auto 0 auto;background-color:#000;width:100%;height:60px;text-align:right;color:#FFF;}#left p {padding:0 10px;}#right p {padding:0 10px;}p.top {margin-top:20px;}</style></head><body> <div id="header"> <p>Here is the header: 50px high, no positioning.</p> </div><div id="wrap"><div id="left"> <p class="top">This design uses a defined body height of 100% which allows setting the contained left and right divs at 100% height.</p> <p>This design uses a defined body height of 100% which allows setting the contained left and right divs at 100% height.</p> <p>This design uses a defined body height of 100% which allows setting the contained left and right divs at 100% height.</p></div><div id="content"> <p>This design uses a defined body height which of 100% allows setting the contained left and right divs at 100% height. </p> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /></div><div id="right"> <p class="top">To solve an inheritance issue displayed in div #right as rendered in Opera, class p.top using margin-top:20; is applied to the first paragraph of each outer divs.</p> <p>This design uses a defined body height which of 100% allows setting the contained left and right divs at 100% height.</p> <p>This design uses a defined body height which of 100% allows setting the contained left and right divs at 100% height.</p> </div></div><div id="footer"> <p>This is the footer.</p></div></body></html>
  21. Wow, that works great. Thanks for the quick reply.My next step would be to have the header go all the way across the screen, and have the height at 154px, while keeping the footer at the bottom of the screen. Adding a 100% width to the #header worked for the width issue, but I'm having a problem when revising the height. This is what happened when I tried to revise the code:Case #1:#header {position:absolute;height: 154px; /*<-----THIS IS A REVISION */background-color: #EAEAEA;border:1px solid #333;width:100%; /*<-----THIS IS A REVISION */}#left {position:absolute;left:0;top:154px; /*<-----THIS IS A REVISION */padding:0;width:200px;height:100%;min-height: 100%;color:#333;background:#eaeaea;border:1px solid #333;}#content {position:static;margin-left:220px;margin-right:220px;margin-bottom:20px;color:#333;background:#ffc;border:1px solid #333;padding:0 10px;}#right {position:absolute;right:0;top:154px; /*<-----THIS IS A REVISION */padding:0;width:200px;height:100%;min-height: 100%;color:#333;background:#eaeaea;border:1px solid #333;}Case #2:#header {position:relative;height: 154px; /*<-----THIS IS A REVISION */background-color: #EAEAEA;border:1px solid #333;width:100%; /*<-----THIS IS A REVISION */}#left {position:absolute;left:0;top:0;padding:0;width:200px;height:100%;min-height: 100%;color:#333;background:#eaeaea;border:1px solid #333;margin-top:154px; /*<-----THIS IS A REVISION */}#content {position:static;margin-left:220px;margin-right:220px;margin-bottom:20px;color:#333;background:#ffc;border:1px solid #333;padding:0 10px;}#right {position:absolute;right:0;top:0;padding:0;width:200px;height:100%;min-height: 100%;color:#333;background:#eaeaea;border:1px solid #333;margin-top:154px; /*<-----THIS IS A REVISION */}Result of both: The header looks great, but the footer is now above the left and right columns by 154px.I realize that I'm probably going about it the wrong way, so if you could please help to point me in the right direction, that would be great. Thanks again for your help.
  22. I found this great tutorial at titled "CSS 100% Height DIV's tutorial" at http://www.webmasterworld.com/forum83/200.htm, which seemed to solve my problem. I'm creating a new site with a three column design, a header, and a footer. When I copied and pasted the code into my page, it worked great in IE6, IE7 and Firefox.So I then entered code for a header and a footer, and it again worked great in all three browsers. But when I tested it out by entering a bunch of <br />, the footer didn't stay at the bottom of the page.If anyone can look at the code below, and let me know what I'm doing wrong, it would be greatly appreciated. Thanks for any help. <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" ><head><title>One Hundred Percent Height Divs</title><!-- Original code from: http://www.webmasterworld.com/forum83/200.htm --><style type="text/css" media="screen">body {margin:0;padding:0;height:100%; /* this is the key! */}#header {position:absolute;height: 50px;background-color: #EAEAEA;border:1px solid #333;padding:4px;} #left {position:absolute;left:0;top:0;padding:0;width:200px;height:100%; /* works only if parent container is assigned a height value */color:#333;background:#eaeaea;border:1px solid #333;}#content {position:static;margin-left:220px;margin-right:220px;margin-bottom:20px;color:#333;background:#ffc;border:1px solid #333;padding:0 10px;}#right {position:absolute;right:0;top:0;padding:0;width:200px;height:100%; /* works only if parent container is assigned a height value */color:#333;background:#eaeaea;border:1px solid #333;}#footer { position:absolute; left:0; background-color:#000; width:100%; top:100%; height:60px; text-align:right; color:#FFF;}#left p {padding:0 10px;}#right p {padding:0 10px;}p.top {margin-top:20px;}</style></head><body><div id="header"><p>Here is the header: 50px high, no positioning.</p></div><div id="left"><p class="top">This design uses a defined body height of 100% which allows setting thecontained left and right divs at 100% height.</p><p>This design uses a defined body height of 100% which allows setting the contained left andright divs at 100% height.</p><p>This design uses a defined body height of 100% which allows setting the contained left andright divs at 100% height.</p></div><div id="content"><p>This design uses a defined body height which of 100% allows setting the contained left andright divs at 100% height.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></p></div><div id="right"><p class="top">To solve an inheritance issue displayed in div #right as rendered in Opera, class p.topusing margin-top:20; is applied to the first paragraph of each outer divs.</p><p>This design uses a defined body height which of 100% allows setting the contained left andright divs at 100% height.</p><p>This design uses a defined body height which of 100% allows setting the contained left andright divs at 100% height.</p></div><div id="footer"><p>This is the footer.</p></div></body></html>
  23. My problem is that my application properly pulls an ASP.NET file on my machine using Visual Web Developer 2005, but it doesn't pull it properly when a copy of the application was uploaded to our test server. On my machine, I listed the entire path for the ASP.NET doc to be pulled (c:\Documents and Settings\MYUSERNAME\My Documents\Visual Studio 2005\Projects\DIRECTORY\SUBDIRECTORY\PAGE.aspx). On the test server, I'm attempting to pull the ASP.NET doc with a UNC share (\\SERVERNAME\DIRECTORY\SUBDIRECTORY\PAGE.aspx).I'm using the FileInfo Class to do this, and I've included the two versions of code below. If anyone could please let me know what I'm doing wrong, that would be great. (Hopefully it's something obvious) Thanks.OLD METHOD ON MACHINE: Partial Class MasterPage Inherits System.Web.UI.MasterPage Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Assign page path to string value Dim strPagePath = Request.ServerVariables("PATH_INFO") Response.Write("<strong>strPagePath: </strong>" & strPagePath & "<br />") 'test 'Assign full page path Dim strFullPagePath = "c:\Documents and Settings\MYUSERNAME\My Documents\Visual Studio 2005\Projects" & strPagePath 'Assign path to FileInfo Class Dim fi As FileInfo = New FileInfo(strFullPagePath) Dim strPageId As String, strPathNoFileName As String Dim strXMLPath_mc As String, strXSLPath_mc As String, strCSSPath As String 'Check if files exist If Not fi.Exists Then strPageId = "default" strPathNoFileName = "http://localhost:1309/DIRECTORYNAME" Else strPageId = fi.Name.Replace(fi.Extension, "") 'without extension strPathNoFileName = strPagePath.Replace(fi.Name, "") 'Assign dynamic page paths strXMLPath_mc = strPathNoFileName + "docs/xml/" & strPageId & ".xml" 'xml doc strXSLPath_mc = strPathNoFileName + "docs/xslt/" & strPageId & ".xsl" 'xsl doc strCSSPath = strPathNoFileName + "docs/css/" & strPageId & ".css" 'css doc End If End SubEnd Class RESULTING VALUE:strFullPagePath = "c:\Documents and Settings\MYUSERNAME\My Documents\Visual Studio 2005\Projects\DIRECTORY\SUBDIRECTORY\PAGE.aspx"NEW METHOD ON TEST SERVER: Partial Class MasterPage Inherits System.Web.UI.MasterPage Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Assign page path to string value Dim strPagePath = Request.ServerVariables("PATH_INFO") Dim strPagePath_fi As String = strPagePath.Replace("/", "\") 'replace slash Dim strFullPagePath = "\\SERVERNAME\DIRECTORY" & strPagePath_fi '<---THIS IS THE PROBLEM 'Assign path to FileInfo Class Dim fi As FileInfo = New FileInfo(strFullPagePath) Dim strPageId As String, strPathNoFileName As String Dim strXMLPath_mc As String, strXSLPath_mc As String, strCSSPath As String 'Check if files exist If Not fi.Exists Then strPageId = "default" strPathNoFileName = "http://SERVERNAME/DIRECTORY" Else strPageId = fi.Name.Replace(fi.Extension, "") 'without extension strPathNoFileName = strPagePath.Replace(fi.Name, "") 'Assign dynamic page paths strXMLPath_mc = strPathNoFileName + "docs/xml/" & strPageId & ".xml" 'xml doc strXSLPath_mc = strPathNoFileName + "docs/xslt/" & strPageId & ".xsl" 'xsl doc strCSSPath = strPathNoFileName + "docs/css/" & strPageId & ".css" 'css doc End If End SubEnd Class RESULTING VALUE:strFullPagePath = "\\SERVERNAME\DIRECTORY\SUBDIRECTORY\PAGE.aspx"
  24. It worked great! Thanks for the quick response.
  25. I'm trying to use the replace method to replace all instances of "a" and "b" characters within a string, but I'm running into a problem. I have accomplished this in my VB version without a problem, but the JavaScript version is only replacing the first instance of the character in the string. I've included all of the referenced code below. If anyone could please let me know what I'm doing wrong, that would be great. Thanks for any and all help.Problem: JS version replaces only the first instance of a character, while the VB version replaces all instances of characters.Example value: bababaVB version (works):'Declare variablesDim strA As String = "ZZ~"Dim strB As String = "YY~"Dim strValue_display As String = strValue_originalstrValue_display = strValue_display.replace("a",strA)Response.Write("strValue_display (a):" & strValue_display & "<br />")strValue_display = strValue_display.replace("b",strB)Response.Write("strValue_display (:" & strValue_display & "<br />")'Resulting value: YY~ZZ~YY~ZZ~YY~ZZ~JScript version (doesn't work)://Declare variablesvar strA = "ZZ~";var strB = "YY~";var strValue_display = strValue_original;strValue_display = strValue_display.replace("a",strA);Response.Write("strValue_display (a):" + strValue_display + "<br />");strValue_display = strValue_display.replace("b",strB);Response.Write("strValue_display (:" + strValue_display + "<br />");//Resulting value: YY~ZZ~baba
×
×
  • Create New...