Jump to content

kwilliams

Members
  • Content Count

    229
  • Joined

  • Last visited

Everything posted by kwilliams

  1. I've thought of that, but I wanted to set the properties for several years of months in the XML doc. So May 2008 and May 2009 would both have an id of "05".But here's a solution that was forwarded to me my someone else in-case anyone's interested:<xsl:for-each select="events/month[@id >= $current_month]"> <xsl:if test="position() < 3"> <xsl:value-of select="name" /><br /> </xsl:if></xsl:for-each>In addition to that code, I also added additional code to allow for events for next year also, like this:<xsl:for-each select="events/month[(@id >= $current_month or @year = $current_year + 1)]"> <xsl:if test="position() <= 12"> <option value="{$site_domain}{$currentpath}{@id}"> <xsl:value-of select="name" /><br /> </option> </xsl:if> </xsl:for-each>...and since the events calendar will only list 12 months at a time, I don't have to worry about events overlapping. Thanks for your input.
  2. I would like to pull 3 event nodes (May, June, and July) that are located within a bunch of other nodes from the following XML doc, starting with node #2 (name=May 2008): <events> <month id="04" year="2008"> <name>April 2008</name> </month> <month id="05" year="2008"> <name>May 2008</name> </month> <month id="06" year="2008"> <name>June 2008</name> </month> <month id="07" year="2008"> <name>July 2008</name> </month> <month id="08" year="2008"> <name>August 2008</name> </month></events> I'm pulling in a parameter value from an ASP.NET doc that contains the current month's month-value (05), so now I need to only display the 3 nodes after that starting node. This the the XSLT doc that I've created: <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:asp="remove"><xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration="yes"/> <xsl:param name="current_month" select="''" /><!-- Populated from ASP.NET doc / contains "05" value --> <xsl:param name="current_year" select="''" /><!-- Populated from ASP.NET doc / contains "2008" value --> <xsl:template match="/"> <!-- Pulls current month using $current_month parameter --> <xsl:variable name="current_month_id" select="events/month[@id = $current_month and @year = $current_year]/@id" /> <!-- ***Q: How can I apply the "$current_month_id" variable to the <for-each" method below??? --> <xsl:for-each select="events/month[position() <= 3]"> <xsl:value-of select="name" /><br /> </xsl:for-each> </xsl:template></xsl:stylesheet> But I'm stuck on how to only pull the 3 nodes after that original node. I know that using the position() method is probably the way to go, but I can't figure out how to do it. If anyone could point me in the right direction, it would be greatly appreciated.
  3. I was thinking the same thing, but since the codebehind page is being called from the content.aspx page in its page declaration, shouldn't that automatically load the CB code?
  4. Sure. This is the block of code:Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Assign path to FileInfo Class Dim strXMLPath_mc As String, strXSLPath_mc As String strXMLPath_mc = "docs/xml/content.xml" 'xml doc strXSLPath_mc = "docs/xslt/content.xsl" 'xsl doc 'Assign maincolumn XML/XSLT transformation properties xslTransform_mc.DocumentSource = strXMLPath_mc xslTransform_mc.TransformSource = strXSLPath_mc End Sub and no error are returned. What I did is place code in the XSLT doc to display whether or not the XSLT parameters were returned, like this:$xslt_category: <xsl:value-of select="$xslt_category" /><br />$xslt_fullname: <xsl:value-of select="$xslt_fullname" /><br />When I enter "General" into the category form field, and "Kat" info the FullName field, this is what's returned with the Master Page version:$xslt_category: General$xslt_fullname: Kat...but when that same block of code is placed in the Content Page's CB page, no results are returned.$xslt_category:$xslt_fullname:Hopefully that helps to explain things better. Thanks for any help.
  5. I'm using the Master Page method on my site, but I'm having a problem with using the content page's code-behind doc (VB). If I place a block of code in the Master Page's code-behind file, it works great. But if I place that same block of code in the content page's code-behind page, it doesn't work.I thought that I had everything set up properly, but obviously the content's CB is not being called properly from the content page. Below is my code. Please let me know what I'm doing wrong. Thanks.Master Code-Behind Page(MasterPage.master.vb) Partial Class MasterPage Inherits System.Web.UI.MasterPage Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 'Assign path to FileInfo Class Dim strXMLPath_mc As String, strXSLPath_mc As String strXMLPath_mc = "docs/xml/content.xml" 'xml doc strXSLPath_mc = "docs/xslt/content.xsl" 'xsl doc 'Assign maincolumn XML/XSLT transformation properties xslTransform_mc.DocumentSource = strXMLPath_mc xslTransform_mc.TransformSource = strXSLPath_mc End SubEnd Class Master Page (MasterPage.master) <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" Explicit="True" 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></head><body> <div id="content"> <asp:Xml id="xslTransform_mc" runat="server"></asp:Xml> </div><!-- end content --></body></html> Content Page (content.aspx) <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" CodeFile="content.aspx.vb" Inherits="content" AutoEventWireup="false" title="Content Page" %> Content Code-Behind Page (content.aspx.vb) Partial Class content Inherits System.Web.UI.Page Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) If Not Page.IsPostBack Then 'Create the XsltArgumentList object Dim args As New XsltArgumentList() 'Declare form variables Dim category_form As String = Request.Form("txtCategory") Dim fullname_form As String = Request.Form("txtFullName") 'Declare XsltArguments If category_form <> "" Then args.AddParam("xslt_category", "", category_form) End If If fullname_form <> "" Then args.AddParam("xslt_fullname", "", fullname_form) End If End If End SubEnd Class XML doc (content.xml) <?xml version="1.0" encoding="ISO-8859-1"?><content> <field id="category"> <name>txtCategory</name> <title>Category</title> <type>text</type> <maxlength>40</maxlength> <size>20</size> <required>false</required> </field> <field id="fullname"> <name>txtFullName</name> <title>Full Name</title> <type>text</type> <maxlength>40</maxlength> <size>20</size> <required>false</required> </field></content> XSLT doc (content.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:variable name="currentpath">http://www.mysite.com/content.aspx</xsl:variable><xsl:param name="xslt_category" select="''" /><xsl:param name="xslt_fullname" select="''" /> <xsl:template match="/"> <form name="formFeedback" action="{$currentpath}" method="post"> <xsl:for-each select="content/field"> <input id="{@id}" name="{name}" title="{title}" type="{type}" maxlength="{maxlength}" size="{size}" value="" /><br /> </xsl:for-each> </xsl:template></xsl:stylesheet>
  6. Because I am not a *lazy* person, I've been seriously thinking of creating an in-house solution using an RTE for the formatting of new web pages.The CMS solution that I would need would include the creation and editing of new web pages with formatting options, the maintenance of forms & documents, and the creation of new online fillable forms. If I was to do an in-house solution, I think that I could accomplish the first with the use of a good RTE, and the second with a simple ASP.NET XML form. But the third task is where I'm stumped. I'd need to use/create a RTE that allows users to create forms, which I can then edit (if need be), and upload to the site. I'd also need a project management environment set up to make sure that the proper users are editing and approving such edits.So as you can see, an in-house solution would be a lot of work if I was to do it on my own, since I am the only Webmaster here. So the use of a CMS for some if not all of the above tasks would make things a lot easier. So, does InfoPath have an option that allows users to create online fillable forms? Is there a way to create a web-based solution with InfoPath so that users can create and edit the site through our intranet or extranet? While I'm waiting for answers to my questions, I'm going to go to the InfoPath website to research the solution on my own. Thanks for any info.
  7. I'm using XML docs to store basic page data across my site. So default.xml contains the data that will be displayed on default.aspx, while default.xsl formats the XML data using a XML/XSL transformation on the ASP.NET page.So I'm looking for a content management system that can work with dynamic data.
  8. I need some advice, because I'm not having very much luck finding this information.Is there a content management system out there that doesn't cost an arm and a leg that can work with XML data?
  9. Hi jesh,Thanks for the suggestions. I looked over the first article you titled "XmlDataSource" at http://msdn.microsoft.com/en-us/library/sy...datasource.aspx, and noticed this sentence: "No XSLT transformation can be specified in the Transform or TransformFile properties." So this solution wouldn't work with my setup, as my entire site uses XML/XSLT transformations from a central ASP.NET Master Page.Concerning the second suggestion, I think that it also focuses on using the ASP.NET code-behind doc to do the work, while I'd prefer a way for the XSL doc to utilize the ASP.NET calendar control on its own. I've read several articles that say this is possible, but when I've tried their sample code, it never works. Do you have any suggestions on how I can accomplish this? I'd appreciate and and all help. Thanks.
  10. Sure. I basically want to use the ASP.NET Calendar Control (see http://www.w3schools.com/aspnet/control_calendar.asp) within a XML/XSLT transformation. After I've created a basic ASP.NET calendar within the XSLT doc, I then want to try to populate the calendar with events that are located within a XML document.I've been reading about ways to use ASP.NET controls within an XSLT document, but haven't had any success in implementing it. Do you know of a way to do this? Hope this info is more thorough, but let me know if you need any other info. Thanks.
  11. Can someone give me the basics or point me in the right direction on how I can create an ASP.NET calendar control within a XML/XSLT transformation? I'd really appreciate any help. Thanks.
  12. For some reason, it's now working. It must have needed some time to load or something. Thanks anyway.
  13. I have an XSLT page that pulls a variable from a JavaScript document. This is what the code looks like: JavaScript //Generic variablesvar subject = "?Subject=Website Comment/Question";var mailto = "mailto:";var at = "@";var url = "mysite.com";//User-specific variablesvar strIT_webmaster_url = "webmaster";var strITEmail_webmaster_url = "<a href=" + mailto + strIT_webmaster_url + at + url + subject + ">" + strIT_webmaster_url + at + url + "<\/a>"; XSLT #1: <?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="/"> Email: <script language="javascript" type="text/javascript">document.write(strITEmail_webmaster_url);</script> </xsl:template></xsl:stylesheet> This static version works great, but I'm now wanting to pull the JS variable by using a XSLT variable is instead of the static value. This is what that code looks like:XSLT #2: <?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:variable name="email_webmaster">strITEmail_webmaster_url</xsl:variable> <xsl:template match="/"> Email: <script language="javascript" type="text/javascript">document.write(<xsl:value-of select="$email_webmaster" />);</script> </xsl:template></xsl:stylesheet> Although the source code of each looks exactly the same, the result of the 2nd set of code produces an "undefined" value. Is this happening because of the order in which the data is processed, or for some other reason? I'd appreciate any input.
  14. I had already tried that too, but unfortunately it didn't work. Any other suggestions?
  15. My site's links have the text-decoration property set to "underline". In Firefox, the linked images are showing an underline, but in IE and other browsers, that underline doesn't show up.I've seen some other articles and posts (like http://archivist.incutio.com/viewlist/css-discuss/56774), and the only solution I've found that works is "display:block;". I cannot use that property in my site, as it moves the images from where they are supposed to be. Does anyone know of another way to make this work?P.S. This is what I currently have my "img" CSS property set to:img { border:none; text-decoration:none; line-height:0;}
  16. kwilliams

    DateTime Problem

    I'm using the following code to pull the current date in mm/dd/yyyy format:Dim dtCurrDate As DateTime = DateTime.Now 'Assign current dateOn the test server, 03/12/2008 11:25:50 AM is returned, and the date is formatted properly (mm/dd/yyyy). But on the web server, 3/12/2008 11:25:50 AM is returned and the date is not formatted properly (m/dd/yyyy). My Network Administrator made sure to change the date format on the server from m/dd/yyyy to mm/dd/yyyy, but it didn't fix the problem when I re-loaded the page. Both servers are running ASP.NET 2.0. What could be causing this problem?
  17. Thanks for the link, but that doesn't solve my problem when it comes to a 3-column layout. That only deals with having a footer at the bottom of the page. If you or anyone could include info and/or links to examples using a 3-column layout that solves my problem, that would be great. Thanks.
  18. I've been messing around with a copy of a 3-column CSS stylesheet at http://www.positioniseverything.net/guests/3colcomplex.html, and I have a question. If the content in the middle column is short, and the content in left column and/or right column is much longer, the content from the left and right columns overlap the gray background on the bottom. This happens in IE7 and Firefox. I'm including the code below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><!-- Source: http://www.positioniseverything.net/guests/3colcomplex.html --><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>TEST - 3 Column Complex Layout demo</title> <meta name="author" content="Holly Bergevin, April 1, 2003" /> <meta http-equiv="content-Type" content="text/html; charset=iso-8859-1" /> <meta name="mssmarttagspreventparsing" content="true" /> <meta name="description" content="A demo showing possibilities for laying out a complex 3-col page." /> <meta name="keywords" content="demo,test,big john,big,john,position is everything, position,css,html,bug,bugs,bug fix,holly bergevin,holly's wilderness" /> <meta name="distribution" content="global" /> <meta name="resource-type" content="document" /> <meta name="robots" content="all" /> <meta http-equiv="imagetoolbar" content="no" /><style type="text/css"><!--/* >>>>> Page Styles <<<<< */html, body {margin: 0; padding: 0; font-size: 100%; }body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 80%; color: #000; background: #9ba49b; }#pagetitle { margin: 0; padding: 10px 0 0 0; text-align: center; font-size: 210%; color: #771464; }pre { margin: 0 0 0 10px; padding-top: 8px; font-family: Verdana, sans-serif; font-size: 95%; font-weight: normal; }p {margin: 0; padding: 8px 7px 0 10px; }#contents p {font-weight: bold; }.altcolor {color: #eef7e2; font-weight: bold; }.altcolor2 {color: #cde7a8; }.altcolor3 { color: #771464; font-weight: bold; }#demotext { border: 2px solid #233622; background: #cde7a8; color: #233622; margin: 8px 149px 5px 10px; padding: 0 5px 5px 0; position: relative; } /*** for IE6 ***/ a:link {color: #eef7e2; text-decoration: underline; padding: 1px; }a:visited {color: #eef7e2; text-decoration: underline; padding: 1px; }a:hover {color: #000; background: #eef7e2; text-decoration: underline; padding: 1px; }#leftbox a:link, #leftbox a:visited {color: #233622; text-decoration: underline; }.right a:link strong, .right a:visited strong, .right a:link, .right a:visited { color: #000; text-decoration: underline; background: #eef7e2; padding: 1px; }/*** Redundancy in this selector and the one below allows Op6 to display links properly ***/.right a:hover strong, .right a:hover {color: #771464; background: #f4e6ef; padding: 1px; }#contents a:link, #contents a:visited { color: #000; text-decoration: underline; background: #f4e6ef; padding-top: 0; }#contents a:hover {color: #f9f; background: #233622; padding-top: 0; }#footer a:link, #footer a:visited {color: #771464; }strong {font-weight: bold; color: #233622; } pre strong {color: #000; }#contents strong {color: #f9f; }#contents pre.altcolor2 strong {color: #cde7a8; }.alignright {margin: 0; padding: 1em 10px 2.5em 0; text-align: right; }.small {font-size: .9em; color: #771464; }.alignright strong {color: #771464; font-weight: bold; }.decoration {float: right; margin: 0.5em 1em 3px 3px; position: relative; } /*** for IE6 ***/html[xmlns] .decoration {margin: 0 1em 0 0; } /*** Moz put the image too low ***/.kudos { margin-top: 3em; border-top: 3px double #233622; border-bottom: 3px double #233622; padding-bottom: 5px; }#bottom {font-size: 1px; line-height:0; margin:0; padding:0;}/* *****>>>>> Demo Styles <<<<<***** *//*** The #header div has a static position and a background image ***/#header { margin: 0; padding: 0; background: url("images/waterlilies6.jpg") 0 0 no-repeat; /*** this is a shorthand property for the various background properties ***/ height: 100px; } /*** must be set so the following absolutely positioned divs are placed correctly on initial load of the page***/ #leftbox { position: absolute; left: 0px; width: 215px; border-top: 1px solid #000; background-color: #9ba49b; color: #000; padding-top: 5px; }#container { margin-left: 215px; background: #faf5f8 url("images/gif/rightboxline.gif") 100% 0 repeat-y; border-left: 1px solid #000; }#navmenu { background-color: #879186; border: 1px solid #000; border-width: 1px 0; padding: 3px 0; position: relative; } /*** IE6 needs this to display the div ***/ /* Hide from IE5-Mac \*/* html #navmenu {height: 1%;}/* end hide *//*** This hack will make IE5-win display the background color for the nav ***/#navmenu ul { display: block; list-style: none; padding: 0; margin: 0; font-family: Verdana, sans-serif; text-align: center; line-height: 1.2em; }#navmenu ul li { font-weight: bold; display: block; float: left; position: relative; /*** IE6 needs this to display the links ***/ padding: 1px 0; margin: 3px 0; width: 10em; border-right: 2px solid #000; }#navmenu ul li.first { margin-left: 0; list-style: none; }#navmenu ul li.last { border-right: none; }#navmenu a { padding: 3px 0; color: #000; } #navmenu a:hover { color: #faf5f8; background: #879186; }#navclear { display: block; clear: both; }/*** IE5/Mac has trouble with right positioned boxes due to a secret margin. See - http://www.l-c-n.com/IE5tests/right_pos/index.shtml - Philippe Wittenbergh's page for an explanation of this problem and Sam Foster's page for an explanation of the hack used - http://www.sam-i-am.com/testsuite/css/mac_ie5_hack.html - ***/ #rightbox { position: absolute; right: 16px; margin-right: -15px; width: 138px; padding-top: 5px; }/* hide the following from IE5-Mac \*/#rightbox { right: 0; margin-right: 0; }/* IE5-Mac can see the rest */#wrapper { margin-right: 138px; padding-top: 5px; }/*** Tan hack for IE. Only IE browsers see this selector. This replaces the old Tantek hack. Please see Edwardson Tan's page. http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html ***/* html #wrapper { width: 100%; /*** IE5.5 needs this value to eliminate a horizontal scrollbar ***/ w\idth: auto; } /*** resets the value for IE6 and IE5-Mac ***/#content { float: left; margin-left: 6px; width: 95%; padding: 5px 5px 5px 0; background: #c3c8c3; }html>body .left {margin-left: 12px; } /*** IE doubles the margin on the float. This sets the margin to the correct width for others ***/.right { float: right; margin-right: 6px; width: 43%; padding: 5px 5px 5px 0; background: #c3c8c3; }html>body .right {margin-right: 12px; } /*** IE doubles the margin on the float. This sets the margin to the correct width for others ***/.clear { clear: both; margin: 0; padding: 0; }#contents { background-color: #233622; margin: 8px 149px 5px 10px; /*margin-right: 149px; margin-left: 10px;*/ color: #eef7e2; padding: 3px 3px 15px 3px; position: relative; } /*** IE6 needs this to display the div ***/#footer { background: #f0f1f0; margin-top: 1.5em; margin-right: 139px; border-top: 1px dashed #888; }-->#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; /* ice blue */}.root { border:1px solid #306; /*'border-width' 'border-style' 'color'*/ text-align:center; background-color: #99C; /* light blue */ color:#FFF;/* white */}#nav li { /* all list items */ float: left; width: 116px; /* width needed or else Opera goes nuts */}#nav li ul { /* second-level lists */ position: absolute; background-color: #99C; /* light blue */ width: 116px; 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:-1px; *margin-left:-59px; /* for IE5.5+ only */ margin-top:0px; 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: -17px 0 0 116px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/ *margin-left: 116px; /* 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;}</style></head><body> <div id="header"> <strong>##HEADER##</strong> </div><!-- end header --> <div id="leftbox"> <strong>##LEFT COLUMN##</strong> <br /> content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. </div><!-- end leftbox --> <div id="container"> <div id="rightbox"> <strong>##RIGHT COLUMN##</strong> <br /> content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here.</div><!-- end rightbox --> <div id="wrapper"> <h1>Page Title</h1> Home > Another Page > Another page again <br /><br /> <div id="content"> content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. content will go here. </div><!-- end content --> <div class="clear"> </div><!-- end clear --> </div><!-- end wrapper --> <div id="footer" align="center"> <strong>##FOOTER##</strong> </div><!-- end footer --> </div><!-- end container --></body></html> If anyone can see of a way to make the left and right column go all the way to the bottom of the page when the content is so short, that would be great. This scenario happens from time-to-time on my site, so I really need this to work. Thanks in advance for any and all help.
  19. Will do. I was thinking the same thing. I appreciate the info. Thanks for the example Try/Catch. It's kind of a pain being a newbie, so I appreciate your help.
  20. Thanks Reg Edit,Could you give me a quick example of a try/catch using my code? I'd appreciate it.
  21. I have an ASP.NET page that parses an external XML feed (please see code below). It works...but when the feed goes down, it subsequently brings my site down. So I've created a default XML document that's located on my internal server a backup method when/if the external feed goes down. But I have no idea how to do this. If someone could let me know how to accomplish this, or point me in the right direction, that would be great. Thanks in advance.ASP.NET XML FEED CODE 'Check for active amber alertDim strAlertTitle As String, strAlertDescription As StringDim intAlertCounter As Integer = 0Dim alert_xmld As XmlDocumentDim alert_nodelist As XmlNodeListDim alert_node As XmlNode'Create the XML Documentalert_xmld = New XmlDocument()'Load the Xml filealert_xmld.Load("http://codeamber.org/a1xl04act/amberalert.xml") 'LIVE 'alert_xmld.Load("http://www.mysite.com/docs/xml/alert.xml") 'DEFAULT XML DOC TO USE AT DOWNTIME'Get the list of name nodesalert_nodelist = alert_xmld.SelectNodes("/AmberAlerts/AmberAlert[Alertstatus/@status = 'open' and contains(Alertinfo/@states, 'CO')]") 'Loop active amber alertsFor Each alert_node In alert_nodelist intAACounter = intAACounter + 1 If intAACounter >= 1 Then strAlertTitle = "Amber Alert" strAlertDescription = "There is currently an amber alert in Colorado." Else If intAACounter = 0 Then strAlertTitle = "Amber Alert" strAlertDescription = "There are currently no amber alerts in Colorado." End IfNext 'end loopResponse.Write(strAlertTitle & ": " & strAlertDescription & "<br /><br />")
  22. Hi Jesh,I had just received that suggestion from someone in another forum, so I guess great minds *do* think alike:)Here is the complete solution:Change this:Partial Class MasterPage Inherits System.Web.UI.MasterPage Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim CurrentState As String = "Colorado" End SubEnd ClasstoPartial Class MasterPage Inherits System.Web.UI.MasterPage Public CurrentState as String Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) CurrentState = "Colorado" End SubEnd Classand thisvar currentState = "<% Response.Write(CurrentState) %>";tovar currentState = "<%= CurrentState %>";"I probably should explain why you need to do that! >< When you declare your variable CurrentState inside of your method like that, it is in scope only to that method and to nothing else. By declaring it as a Public member of the class it is aviable to all methods in your class and thus allows you to use the value on your page."Thanks again Jesh:)
  23. Thanks for replying so quickly Jesh.When I moved the variable declaration outside the Page_Load handler, like this: Partial Class MasterPage Inherits System.Web.UI.MasterPage Dim CurrentState As String = "Colorado"End Class I now receive a different error:Compiler Error Message: BC30390: 'MasterPage.CurrentState' is not accessible in this context because it is 'Private'.Do I need to add some other code around the variable declaration to make this work?
×
×
  • Create New...