0
我有一個web應用程序:當用戶按「搜索」,他必須輸入一些其他值,然後根據該值,運行一些其他代碼。客戶端Javascript輸入提示框
protected void btnSearch_Click(object sender, EventArgs e)
{
ClearGridViewEmp();
//Does table contain encrypted columns
bool verifyEDT = SQLQueryAnalyser.IsTableInEDT("Employees",connectionName);
string prompt = @"<script type='text/javascript'>
var value = window.prompt('Input Passphrase', 'Type your passphrase here');
storeUserInput(value);</script>";
Page.ClientScript.RegisterStartupScript(GetType(), "Prompt", prompt);
if (verifyEDT)
{
string passphrase = hidValue.Value;
//do other stuff with the passphrase
}
FillGridViewWithEmp();
}
現在的問題是,經過的代碼,其餘都是運行時出現的提示輸入和頂部它完全打亂了網站的佈局。我一直在尋找解決方案,但我找不到它。如何顯示彈出式輸入提示框,讓用戶輸入一些內容,然後根據該值繼續運行一些代碼。可能嗎?