You must Sign In to post a response.
  • Category: .NET

    A href url+"#id" not calling with modal-dialog in bootstrap .net

    I want a call a url like "https://Demo/test.aspx#AED-34SD" in a href tag into a model dialog box or whitebox in bootstrap in .net.

    I tried with below code but its not working. Please help me into this.

    <a data-toggle="modal" data-target="#Div1" href="default.aspx#afdsfdfdsf-sd34sd" title="TeleMedicine Start">Start</a>

    <div class="modal fade" id="Div1" tabindex="100" role="dialog" aria-labelledby="VideoDetails" aria-hidden="true">
    <div class="modal-dialog">
    <div class="modal-content">
    <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    <h4 class="modal-title" id="H5">Meeting Details</h4>

  • #766554

    # is a Unsafe characters which needs to be encoded.
    Encode it with %23
    Or User Server.UrlEncode(YourUrl);

    Please find below some of the references regarding unsafe characters in URL.

  • #766569

    for testing purpose just pass any url like, if the test case is working fine then there is no issue in your modal, as suggested by Shashi Encode the URL and pass it.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #766586
    We can not pass use the following value as URL. Because in IIS one of the module will check the extension of the file.

    https://Demo/test.aspx#AED-34SD In the link It cannot read ".aspx". It is mid of the query string. so it will give you exception. why you canot pass the you can pass the value as query string
    You can make it as query sting and read it ?
    following are the possibility to change your URL


    If you really want to rewrite the URL , you have to create new module and handle it.

    By Nathan
    Direction is important than speed

  • #766619
    What error you are getting? Check in developer tools if you are getting any error when you click on the link?
    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

Sign In to post your comments