在类文件中动态创建的链接按钮上打开新页面 [英] Opening new page on dynamically created linkbutton from class file

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

问题描述

大家好,

我在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

推荐答案

此外,我不需要类似弹出窗口的功能,因为我希望在新标签页中打开页面
AFAIK,这不在您的手中,您不能强行使用.浏览器设置,可在标签页或新窗口中打开新窗口.

Window.Open()方法将一直打开新窗口,而不是一直打开的窗口中的选项卡.
Moreover i dont need popup like thing,as i want the page to be opened in new tab
AFAIK, this is not in your hand and you cannot force it. It''s browser setting to open new window in tabs or new window.

Window.Open() method would open a new window all the time instead of a tab in already opened window.


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆