mvc pop up window
I have an mvc project with a jqgrid that has an editting column, my problem is when i Try to link the edit in each row to a pop up window, when I add the code below a window pop up opens but I recieve a 402 unothorized error, here is my code in the controller
var jsonData = new
{
total = totalPages,
page = page,
开发者_如何学编程 records = totalRecords,
rows = (
from item in items
select new
{
id = item.Id,
cell = new string[] {
"<A HREF=javascript: void(0) onclick=window.open
('/Views/viewname/Edit/'+"item.code+",'Edit','width=700,height=800'); >Edit</A>",
column2,
column3,
etc ...}
}).ToArray()
};
but if I just link the edit to a regular page through this code
var jsonData = new
{
total = totalPages,
page = page,
records = totalRecords,
rows = (
from item in items
select new
{
id = item.Id,
cell = new string[] {
"<a href=viewfolder/Edit/"+item.Code +">Edit</a> " ,
column2,
column3,
etc ...}
}).ToArray()
I do not have any problems, I have a edit page which works fine if it is not a pop up window, has anybody faced this problem, or can anyone direct me to an example that is similar.Thnaks in advance
Have you tried with quotes around your href
and onclick
attribute values?
精彩评论