Solved

Problem with Panel

Posted on 2014-03-04
1
195 Views
Last Modified: 2014-03-21
Hi,
Having these on Markup
    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <script type="text/javascript">
        ...
        $(function () {
            $("#Panel3").dialog({
                autoOpen: false,
                autoResize: true,
                resizable: false,
                title: "Confirmation",
                open: function (event, ui) {
                    $(this).parent().appendTo("form");		//allow .Net buttons to post back
                }
            });

        });
        function closePopup3() {
            $("#Panel3").dialog("close");
        }

        function openPopup3() {
            $("#Panel3").dialog("open");
        }
        ...
    </script>
	<script language="C#" runat="server">
        ...
        private void clickMe3(object sender, EventArgs e)
        {
            ...
        }
        private void clickNo3(object sender, EventArgs e)
        {
            ...
        }
	</script>
	...
	<div id="Panel3" runat="server">
		Testing message
		<br /><br />
		<asp:Button id="Button3" OnClick="clickMe3" runat="server" Text="Yes"/>
		&nbsp;&nbsp;
		<asp:Button id="Button4" OnClick="clickNo3" runat="server" Text="No"/>
	</div>
	...

Open in new window

no Panel has been shown by these codes. why?

        protected void Page_Load(object sender, EventArgs e)
        {
            ...
            if (!IsPostBack)
            {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "CallEvent", "openPopup3();return false;", true);
                    ...
                    

Open in new window

0
Comment
Question by:HuaMinChen
1 Comment
 
LVL 16

Accepted Solution

by:
SriVaddadi earned 205 total points
ID: 39906917
Is your panel inside a UpdatePanel? If not use ClientScriptManager.RegisterClientScriptBlock
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now