Hi Guys

It´s my first time here and Of course I have a problem.
I have a gridView with a Hyperlink and I´d like to open a Modal Pop Up when I to click in this link.

How can i do it?
is it possible?

Thanks a lot everyone

regards

Recommended Answers

All 3 Replies

There are a couple of methods...
I use this one Submodal

You can also do a little balloon type popup. I use this as well...Balloon Tip

Hi,

You can not achieve this by using following code in grid view

<script language="javascript" type="text/javascript">
    function AreYouSure(snumber)
    {
        alert("Hello : " + snumber);
    }
    </script>

Aspx:
<asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink NavigateUrl='<%# "Javascript:AreYouSure(\""+(DataBinder.Eval(Container.DataItem, "StudentNo").ToString() + "\")") %> ' Text='<%#DataBinder.Eval(Container.DataItem, "StudentNo") %>' ID="linkToTest" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>

you need to define your model inside javascript function AreYouSure, and this model can be alert, confirm or any other customized model box, many are available on net.

Thanks a lot my friend.

I solved my problem yesterday.

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.