Creating a Bootstrap Modal using C#

For further information, please refer to the codes provided below in the code-behind section, which will give you the desired result. In case of any queries, do not hesitate to reach out to me. To address the issue, you may utilize JQuery in the following manner: firstly, use the “call” function upon clicking, and then use “.” to apply further actions. Finally, JSON message can be returned to retrieve the data.


User1535942433 posted

Hi dsultanov,

Based on the details and codes provided, I have successfully created a test that is functioning properly.

You haven’t shared the modal codes with us and it would be helpful if you verify whether the modal id is correct.

As complete codes are not shared with us, I have prepared a demo.

Additional information can be found in the codes presented below.





 protected void testpopup_Click(object sender, EventArgs e)
            if (Testbox.Text == "N")
                ClientScript.RegisterStartupScript(this.GetType(), "Pop", "$('#myModal').modal('show')", true);


Best regards,

Yijing Sun

Frequently Asked Questions

Posted in Uncategorized