Client Side Javascript input prompt box
<p>I have a web application: When the user presses "Search", he has to input some other value and then according to that value, some other code is run.</p>

<pre><code> protected void btnSearch_Click(object sender, EventArgs e)
        {
            ClearGridViewEmp();

            //Does table contain encrypted columns
            bool verifyEDT = SQLQueryAnalyser.IsTableInEDT("Employees",connectionName);

            string prompt = @"&lt;script type='text/javascript'&gt;
            var value = window.prompt('Input Passphrase', 'Type your passphrase here');
            storeUserInput(value);&lt;/script&gt;";
            Page.ClientScript.RegisterStartupScript(GetType(), "Prompt", prompt);

            if (verifyEDT)
            {
                string passphrase = hidValue.Value;
               //do other stuff with the passphrase
            }
            FillGridViewWithEmp();
        }
</code></pre>

<p>Now the problem is that the prompt input appears AFTER all the rest of code is run and on top it completely messes up the layout of the website. I have been searching an entire day for a solution but I cannot find it. How can I show a popup input prompt box, have the user input something and then continue running some code according to the value.? Is it possible?</p>
