2017-01-16 47 views
0

我會坦率地說,我對asp.net幾乎沒有任何經驗。過去幾周我一直在Web Forms中構建一個網站。我想在此網站的某個頁面上放置一個Signature控件。我正在使用SyncFusion。如何使用SyncFusion簽名框

我試圖將其添加到新的Web表單進行測試;

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> 

<%@ Register Assembly="Syncfusion.EJ.Web, Version=14.4460.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %> 

<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
     <ej:Signature ID="Signature1" runat="server"></ej:Signature> 
    </div> 
    </form> 
</body> 
</html> 

但我得到的只是一個空白頁面。我究竟做錯了什麼?

編輯:

這是空瀏覽器中的頁面源代碼;

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head><title> 

</title></head> 
<body> 
    <form method="post" action="./test.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1"> 
<div class="aspNetHidden"> 
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="a7KupFN2IvhJ2xB1RbT9gIJGuq/sSUKCZso7ZYfDhZZR5c9XFfZfctDoaphqu0eXI/FCiapkZDDbKmONWUwSOmQKYeon2OakrX+JCtQ7AzWaYNkS0W6XPn/XQBIl+5gAepOk5prBxAIOUrIv0L7g5r3+LM7yeET8ztjWzCD5ADZ/Vu9CmgE/1wjB9IylHFpocDDNZu4mUru4RbOR0yPzeuhBBdXxMk2Vi7PIUHJ7Dk8cRKdncxSwSsQlUyAZxcl1ZxbUP/vGdOBcxmx2ReO/AS+VvvDZUlfMq8bLkyMc7UJH+Xl+jyxlRCVLkVWIeC5sdMhqPYgnK8MRmlEkba+Nlk2Bipz6IEpvDXw/j+dEUVu/sKoB2O/CJzryw+Hqk27AG67pYTkVs7PRDyFv0+D2it1m023YGbJJX6FxV8GqNeUpPI/kR66jpkZES2RzwWCw3wfdhDocvBTcPGndETFi2Ed1lwbXYeqUXG+ER6kV/PILZSUhj5c74u8QFaKOUtVRMN0mALPkt5VDfmD9CTaKsoHI8H2zBSXPLche+evxHY8dLVJpE5N2MqyT1ETGj+PEPC5hMKaFRyf1KVopBqbPcbmGE+r2bJ/KXwvddQucuIYJPKBNE3gK0ab30ewSHW0fOaums+7P0hN8btfvSQGkFZwfiKerQq8Okpup7DJTB2WE3WFowT7XqYvmoatuqDt80l3VJQovJ3Mg+sJY0lpTg0eikqto6evySKW12tC9tmevkvvnbpoi4fNlmna/rwcO8Nu/wF/ns91CpC2xVHYDsg0x5dYz9vTHRYxJvbbH5WnqtJ5donHgPoM1UqFbDNve" /> 
</div> 

<script type="text/javascript"> 
//<![CDATA[ 
function WebForm_OnSubmit() { 
typeof EJ_ClientSideOnPostBack == 'function' && EJ_ClientSideOnPostBack(); 
return true; 
} 
//]]> 
</script> 

<div> 
    <div id="Signature1"></div> 
</div> 

<div class="aspNetHidden"> 

    <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="75BBA7D6" /> 
</div> 

<script type="text/javascript"> 
//<![CDATA[ 
$("#Signature1").ejSignature({"strokeWidth":2,"enabled":true,"height":"400px","backgroundColor":"#ffffff","strokeColor":"#000000","clientId":"Signature1","uniqueId":"Signature1"}); 
//]]> 
</script> 
</form> 

<!-- Visual Studio Browser Link --> 
<script type="application/json" id="__browserLink_initializationData"> 
    {"appName":"Chrome","requestId":"958d69901e2943e493e9b4da9976b691"} 
</script> 
<script type="text/javascript" src="http://localhost:55500/690a8379ccf649d289724e7760d89595/browserLink" async="async"></script> 
<!-- End Browser Link --> 

</body> 
</html> 

回答

0

Syncfusion簽名沒有任何默認高度或寬度的值。它的高度和寬度都默認爲100%,可以放在給定的div中。因此,我們需要爲簽名設置高度值值。

<div> 
    <ej:Signature ID="Signature1" height="400px" runat="server"></ej:Signature> 
</div> 
+0

我還在空白頁面。有沒有辦法檢查ASP.NET中實際加載的內容?我包括我的頁面源代碼。 – Kayot

相關問題