本文介绍了在类文件中动态创建的链接按钮上打开新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在asp.net中制作了一页,其中包含从类文件动态生成的linkbutton列表.

现在已生成链接按钮并正确显示在页面上,但是我需要的是当我单击该链接按钮时,需要在该链接按钮的onclick的新选项卡中打开一个新页面.

此外,我不需要像这样的弹出窗口,因为我希望在新选项卡中打开页面.

我已经写了这样的代码....
lbdata.Attributes.Add("onclick","window.Open(``Userdetails.aspx?code =" + lbdata.Text +'',``name'',``dialogWidth:630px; dialogHeight:400px;'' );返回false;);


但是它的作用是打开一个我不需要的新弹出窗口.

请帮助我提供一些代码或任何帮助.

谢谢&问候,
Krunal Panchal

Hello everyone,

I have made one page in asp.net which contains list of linkbutton generated dynamically from the class file.

Now the linkbutton is generated and shown on the page properly, but what I need is when I click that linkbutton I need to open a new page in new tab onclick of that linkbutton.

Moreover I dont need popup like thing,as I want the page to be opened in new tab.

I have written the code like this....
lbdata.Attributes.Add("onclick", "window.Open(''Userdetails.aspx?code="+lbdata.Text+"'',''name'',''dialogWidth:630px;dialogHeight:400px;'');return false;");


but what it does is it opens a new popup window which I dont want.

Please help me providing some code or any help.

Thanks & Regards,
Krunal Panchal

推荐答案


这篇关于在类文件中动态创建的链接按钮上打开新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 02:01