0

これが私が持っているものです。テキスト ボックスと検索ボタンがある SharePoint ページ。テキストボックスのデータはすべてのテーブルに関連付けられており、テキストボックスに入力された会社コードに従ってそれらを埋めます。

元のテキスト ボックスに入力した会社コードでフィルター処理された共有ポイント リストが表示される新しいページにユーザーを移動させる URL を追加しようとしています。

これまでのところ、次のように URL をハードコーディングすることで、選択した会社に URL を送信できます。

http://mysite/Lists/Call%20Log/Company%20by%20Category.aspx?View={7C16BC72-8F1A-457A-9908-AF9E66DE97DC}&FilterField1=LinkTitle&FilterValue1=abccompany

なんらかの理由で、 を設定できない、または設定方法がわかりませんfiltervalue1 = <<text from textbox>>

コードのサンプルを次に示します。

<WebPartPages:SPProxyWebPartManager runat="server" id="ProxyWebPartManager">
</WebPartPages:SPProxyWebPartManager>
Enter the CO ID and click &quot;Search&quot;&nbsp;
<asp:TextBox runat="server" id="tb_coID" Width="83px"></asp:TextBox>
&nbsp;
<asp:Button runat="server" Text="Search" id="Button1"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a target="_blank" href="http://site/Lists/Call%20Log/Company%20by%20Category.aspx?View={7C16BC72-8F1A-457A-9908-AF9E66DE97DC}&amp;FilterField1=LinkTitle&amp;FilterValue1=<<text from textbox here>>">
Click Here </a>to view Call Logs
4

1 に答える 1

0

他の誰かが見ている場合、これは私が見つけた私の質問への答えです。

<script type="text/javascript">
function showReport() {
var coid = document.getElementById('ctl00_PlaceHolderMain_tb_coID').value;
window.open("http://site/Lists/Call%20Log/Company%20by%20Category.aspx?View=     {7C16BC72-8F1A-457A-9908-AF9E66DE97DC}&amp;FilterField1=LinkTitle&amp;FilterValue1=" +     coid, "_blank");
}
</script>
    <WebPartPages:SPProxyWebPartManager runat="server" id="ProxyWebPartManager">
    </WebPartPages:SPProxyWebPartManager>Enter the CO ID and click     &quot;Search&quot;&nbsp;
    <asp:TextBox runat="server" id="tb_coID" Width="83px"></asp:TextBox>
    &nbsp;
    <asp:Button runat="server" Text="Search" id="Button1"/>&nbsp;&nbsp;&nbsp;&    nbsp;&nbsp;
    <a href="javascript:void(0);" onclick="showReport();">Click Here</a> to view     Call Logs related to this Company<br>
    <br>

これらのコード行をページの上部に追加するだけで、驚くほど機能します

于 2013-08-14T19:37:30.237 に答える