Link to home
Start Free TrialLog in
Avatar of IntercareSupport
IntercareSupport

asked on

Querystring variable not reading from Data View hyperlink

A query string variable is passed to search page called "FamilyID" (the code that makes up page below).

The page that comes up lists patients.  By clicking "Add", the FamilyID and the Patient_Id are passed as query string variables to the next page--or at least that's the plan.

I can make the PatientID pass via the dataview, but the FamilyID is not being grabbed.  What am I missing?

Example output from dataview:
adult_add.aspx?FamilyID=&Patient_Id=Patient1234
<%@ Page masterpagefile="~masterurl/default.master" language="C#" title="|" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>
<%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain">

				<WebPartPages:SPProxyWebPartManager runat="server" id="ProxyWebPartManager"><SPWebPartConnections>
				
<WebPartPages:spwebpartconnection ID="g_3FF698DB56BC4432BDDAEDED6C515EE5" ConsumerConnectionPointID="DFWP Filter Consumer ID" ConsumerID="g_1a1f8327_7389_4fad_8a7e_fa3c377d5f5e" ProviderConnectionPointID="SFWPRowProviderInterface" ProviderID="g_315efc87_8806_4a47_8123_3af6d6634364">
				
<asp:rowtoparameterstransformer ProviderFieldNames="T1" ConsumerFieldNames="@Patient_Last_Name" />
</WebPartPages:spwebpartconnection>
</SPWebPartConnections></WebPartPages:SPProxyWebPartManager>
				<WebPartPages:DataFormWebPart runat="server" IsIncluded="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="0" Title="Patient Personal" __markuptype="vsattributemarkup" __WebPartId="{1A1F8327-7389-4FAD-8A7E-FA3C377D5F5E}" id="g_1a1f8327_7389_4fad_8a7e_fa3c377d5f5e" pagesize="10" __AllowXSLTEditing="true" WebPart="true" Height="" Width="">
	<DataSources><asp:SqlDataSource runat="server" ProviderName="System.Data.SqlClient" ConnectionString="Data Source=vader;User ID=DB_user;Password=FAKEPASSWORD;Initial Catalog=DB_NAME;" SelectCommand="SELECT [Patient_Id] , [Patient_DOB] , [Patient_First_Name] , [Patient_Last_Name] FROM [Patient_Personal] " id="dataformwebpart3"></asp:SqlDataSource></DataSources>
	
	<datafields>@Patient_Id,Patient_Id;@Patient_DOB,Patient_DOB;@Patient_First_Name,Patient_First_Name;@Patient_Last_Name,Patient_Last_Name;</datafields>
	<XSL><xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
	<xsl:output method="html" indent="no"/>
	<xsl:decimal-format NaN=""/>
								<xsl:param name="dvt_apos">&apos;</xsl:param>
								<xsl:param name="dvt_firstrow">1</xsl:param>
								<xsl:param name="dvt_nextpagedata" />
	<xsl:param name="FamilyID" />
								<xsl:variable name="dvt_1_automode">0</xsl:variable>
								
								
								
								<xsl:template match="/">
												<xsl:call-template name="dvt_1"/>
	</xsl:template>
								<xsl:template name="dvt_1">
												<xsl:variable name="dvt_StyleName">Table</xsl:variable>
												<xsl:variable name="Rows" select="/dsQueryResponse/NewDataSet/Row"/>
												<xsl:variable name="dvt_RowCount" select="count($Rows)" />
												<xsl:variable name="RowLimit" select="10" />
												
												<xsl:variable name="FirstRow" select="$dvt_firstrow" />
												<xsl:variable name="LastRow">
																<xsl:choose>
																				<xsl:when test="($FirstRow + $RowLimit - 1) &gt; $dvt_RowCount"><xsl:value-of select="$dvt_RowCount" /></xsl:when>
																				<xsl:otherwise><xsl:value-of select="$FirstRow + $RowLimit - 1" /></xsl:otherwise>
																</xsl:choose>
												</xsl:variable>
												<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0 or $RowLimit = 0" />
												<table border="0" width="100%" cellpadding="2" cellspacing="0">
			<tr valign="top">
							<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
					<th class="ms-vh" width="1%" nowrap="nowrap"></th>
				</xsl:if>
				<th class="ms-vh" nowrap="">Patient_Id</th>
				<th class="ms-vh" nowrap="">DOB</th>
				<th class="ms-vh" nowrap="">First Name</th>
				<th class="ms-vh" nowrap="">Last Name</th>
			</tr>
																<xsl:call-template name="dvt_1.body">
																				<xsl:with-param name="Rows" select="$Rows[position() &gt;= $FirstRow and position() &lt;= $LastRow]"/>
																				<xsl:with-param name="FirstRow" select="1" />
																				<xsl:with-param name="LastRow" select="$LastRow - $FirstRow + 1" />
																</xsl:call-template>
		</table>
												<xsl:call-template name="dvt_1.commandfooter">
																<xsl:with-param name="FirstRow" select="$FirstRow" />
																<xsl:with-param name="LastRow" select="$LastRow" />
																<xsl:with-param name="RowLimit" select="$RowLimit" />
																<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
																<xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" />
												</xsl:call-template>
								</xsl:template>
								<xsl:template name="dvt_1.body">
												<xsl:param name="Rows"/>
												<xsl:param name="FirstRow" />
												<xsl:param name="LastRow" />
												<xsl:for-each select="$Rows">
																<xsl:variable name="dvt_KeepItemsTogether" select="false()" />
																<xsl:variable name="dvt_HideGroupDetail" select="false()" />
																<xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether">
																				<xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
																								<xsl:call-template name="dvt_1.rowview" />
																				</xsl:if>
																</xsl:if>
												</xsl:for-each>
	</xsl:template>
								<xsl:template name="dvt_1.rowview">
		<tr>
						<xsl:if test="position() mod 2 = 1">
										<xsl:attribute name="class">ms-alternating</xsl:attribute>
			</xsl:if>
						<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
				<td class="ms-vb" width="1%" nowrap="nowrap">
					<span ddwrt:amkeyfield="Patient_Id" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@Patient_Id))" ddwrt:ammode="view"></span>
				</td>
			</xsl:if>
			<td class="ms-vb"><a href="adult_add.aspx?FamilyID={@FamilyID}&amp;Patient_Id={@Patient_Id}">Add</a></td>
			<td class="ms-vb">
				<xsl:value-of select="ddwrt:FormatDate(string(@Patient_DOB) ,1033 ,1)"/>
			</td>
			<td class="ms-vb">
				<xsl:value-of select="@Patient_First_Name"/>
			</td>
			<td class="ms-vb">
				<xsl:value-of select="@Patient_Last_Name"/>
			</td>
		</tr>
	</xsl:template>
								<xsl:template name="dvt_1.commandfooter">
												<xsl:param name="FirstRow" />
												<xsl:param name="LastRow" />
												<xsl:param name="RowLimit" />
												<xsl:param name="dvt_RowCount" />
												<xsl:param name="RealLastRow" />
												<table cellspacing="0" cellpadding="4" border="0" width="100%">
			<tr>
							<xsl:if test="$FirstRow &gt; 1 or $LastRow &lt; $dvt_RowCount">
											<xsl:call-template name="dvt_1.navigation">
															<xsl:with-param name="FirstRow" select="$FirstRow" />
															<xsl:with-param name="LastRow" select="$LastRow" />
															<xsl:with-param name="RowLimit" select="$RowLimit" />
															<xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
															<xsl:with-param name="RealLastRow" select="$RealLastRow" />
											</xsl:call-template>
							</xsl:if>
																</tr>
		</table>
								</xsl:template>
								<xsl:template name="dvt_1.navigation">
												<xsl:param name="FirstRow" />
												<xsl:param name="LastRow" />
												<xsl:param name="RowLimit" />
												<xsl:param name="dvt_RowCount" />
												<xsl:param name="RealLastRow" />
												<xsl:variable name="PrevRow">
																<xsl:choose>
																				<xsl:when test="$FirstRow - $RowLimit &lt; 1">1</xsl:when>
																				<xsl:otherwise>
					<xsl:value-of select="$FirstRow - $RowLimit" />
				</xsl:otherwise>
																</xsl:choose>
												</xsl:variable>
												<xsl:variable name="LastRowValue">
																<xsl:choose>
																				<xsl:when test="$LastRow &gt; $RealLastRow">
					<xsl:value-of select="$LastRow"></xsl:value-of>
				</xsl:when>
																				<xsl:otherwise>
					<xsl:value-of select="$RealLastRow"></xsl:value-of>
				</xsl:otherwise>
																</xsl:choose>
												</xsl:variable>
												<xsl:variable name="NextRow">
			<xsl:value-of select="$LastRowValue + 1"></xsl:value-of>
		</xsl:variable>
												<td nowrap="" class="ms-paging" align="right">
													<xsl:if test="$dvt_firstrow &gt; 1" ddwrt:cf_ignore="1">
				<a>
																	<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1}')" />;</xsl:attribute>
																	Start</a>
																	<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
																	<a>
																	<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$PrevRow,'}'))" />;</xsl:attribute>
																	<img src="/_layouts/images/prev.gif" border="0" alt="Previous" />
																	</a>
																	<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text>
													</xsl:if>
													<xsl:value-of select="$FirstRow" />
													 - <xsl:value-of select="$LastRowValue" />
													<xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&amp;nbsp;</xsl:text>
													<xsl:if test="$LastRowValue &lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1">
				<a>
																	<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'}'))" />;</xsl:attribute>
																	<img src="/_layouts/images/next.gif" border="0" alt="Next" />
																	</a>
			</xsl:if>
												</td>
								</xsl:template></xsl:stylesheet></XSL>
<parameterbindings>
					<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
					<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
					<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
					<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
					<ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/>
					<ParameterBinding Name="FamilyID" Location="QueryString(FamilyID)" DefaultValue=""/>
				</parameterbindings></WebPartPages:DataFormWebPart>
				
				
				
				&nbsp;</asp:Content>
<asp:Content id="Content2" runat="server" contentplaceholderid="PlaceHolderPageDescription">

				<WebPartPages:SimpleFormWebPart webpart="true" runat="server" __webpartid="{315EFC87-8806-4A47-8123-3AF6D6634364}">
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
  <Title>Search Chorus</Title>
  <FrameType>Default</FrameType>
  <Description>Use to connect simple form controls to other Web Parts.</Description>
  <IsIncluded>true</IsIncluded>
  <PartOrder>0</PartOrder>
  <FrameState>Normal</FrameState>
  <Height />
  <Width />
  <AllowRemove>true</AllowRemove>
  <AllowZoneChange>true</AllowZoneChange>
  <AllowMinimize>true</AllowMinimize>
  <AllowConnect>true</AllowConnect>
  <AllowEdit>true</AllowEdit>
  <AllowHide>true</AllowHide>
  <IsVisible>true</IsVisible>
  <DetailLink />
  <HelpLink />
  <HelpMode>Modeless</HelpMode>
  <Dir>Default</Dir>
  <PartImageSmall />
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <PartImageLarge>/_layouts/images/mssfwp.gif</PartImageLarge>
  <IsIncludedFilter />
  <ExportControlledProperties>true</ExportControlledProperties>
  <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
  <ID>g_315efc87_8806_4a47_8123_3af6d6634364</ID>
  <Content xmlns="http://schemas.microsoft.com/WebPart/v2/SimpleForm"><![CDATA[<div onkeydown="javascript:if (event.keyCode == 13) _SFSUBMIT_"><input type="text" name="T1"/><input type="button" value="Go" onclick="javascript:_SFSUBMIT_"/></div>]]></Content>
				</WebPart></WebPartPages:SimpleFormWebPart>
</asp:Content>
<asp:Content id="Content3" runat="server" contentplaceholderid="PlaceHolderAdditionalPageHead">

	</asp:Content>

Open in new window

Avatar of masterpass
masterpass
Flag of India image

If you see your example

adult_add.aspx?FamilyID=&Patient_Id=Patient1234

FamilyID is EMPTY and only Patient_Id is having value.....
Avatar of IntercareSupport
IntercareSupport

ASKER

Right.  I'm passing the querystring variable, but I can't get it to read.

The link above demonstrates that the FamilyID value is not being read, despite the fact that I've sent it.
That link is the rendered output and it's wrong.  That's what I need resolved.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of masterpass
masterpass
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops, sorry I didn't close this item earlier.  Thanks.