How to produce message box in Update Panel in ASP.NET ?


Hi experts!

I’m professional programmer from 10+ years, but new to ASP.NET. I have a easy question to you: how to produce message box to user in ASP.NET ? But satiation is little more complex.

I have a gridview and after user click on button on this gridview it goes to code behind and here I need to produce message to customer.

And to question not be so  easy, this gridview is in UpdatePanel. Till now I was use in Submit buttons this:
Page.RegisterStartupScript("codice", "<script>alert('Accept!'" + customerID + "' );</" + "script>");

But look that this not work in UpdatePanel.

Question 2:
 And other question – do I have options to call Input box in which user can enter some info ? What are command in C# ?

Question 3:
 What are command to open new popup page in code after user click button on some row in GridView.


        protected void grdInvoice_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string customerID = (string)e.CommandArgument;


            if (e.CommandName == "Accept")
            {
               
                Page.RegisterStartupScript("codice", "<script>alert('Accept!'" + customerID + "' );</" + "script>");
                //AcceptFunction(customerID);
            }
            else if (e.CommandName == "Deny")
            {
                Page.RegisterStartupScript("codice", "<script>alert('Deny!'" + customerID + "' );</" + "script>");
            }


        }
dvplayltdAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Edgard YamashitaSystems AnalystCommented:
well for the 1st question here is how you add scripts when running inside a updatepanel:

ScriptManager.RegisterClientScriptBlock(UpdatePanelID, typeof(string), "key", "alert('hey');", true);

for 2nd question,

either you use the javascript command prompt and store the value to send to the server, or create your window using something modalpopup from ajaxcontroltoolkit

http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ModalPopup/ModalPopup.aspx

as the 3rd question
its basicly the same code from question 1 just change ur script..

ps. it should be better to create a new question for 2nd question, since ur not allowed to create 1 question with several different questions

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dvplayltdAuthor Commented:
10X. iN GENERAL you are right - in 1 ask is not good to have more question.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.