New .aspx page in Visual Studio Web Application crashes page
i'm having a WebPart for displaying information about employe开发者_开发技巧es and i want to display only a view information about the persons. The rest should be available after clicken on a "more" link. I tried to get that with opening a "popup"window. But i don't get that to work right. So i tried using a new page. Hence i added a new aspx page to my project in visual studio and added a link to that page like that:
LinkButton link = new LinkButton(); link.Width = Unit.Pixel(20); link.Text = "more";
After building the project i tested it in my webpart page and get an error "An unexpected error occured".
It took me a lot to get the webpart work properly again.
Has anybody an idea what i'm doing wrong. (i also tried to catch an exception without success)
I also tried to add an click event to that "more" link. but then, when i hover above that link with the mouse i see
"javascript:__doPostBack('ctl00$m$g_84d91faf_d0a8_4587_bb7c_712030d2c4ea$ctl00$ctl18','')" i tried with link.OnClientClick and link.OnClick, nothing works.I really need that function for that page. I would highly appreciate it if you can give me a code snippet of a solution.
Thanks in advance
You should use PostBackUrl
property of linkbutton Or on button click event you can call Response.Redirect
精彩评论