Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Gridview Cell Onclick Window.Open http Issue?

Posted on 2014-03-28
3
Medium Priority
?
270 Views
Last Modified: 2014-04-08
Using VS2010 ASP.NET
The following code works fine until I add the http:// before the url. I need the Cells[1] text variable.
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
       if (e.Row.RowType == DataControlRowType.DataRow)
       {
            e.Row.Cells[4].Attributes["onclick"] = "window.open('http://mycompanysite/Prices/AddEdit.aspx?id=" + e.Row.Cells[1].Text + "')";
       }
}

Open in new window

0
Comment
Question by:WorknHardr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39961651
In what way does it "not work"? Is it throwing an exception server side, or just not producing the expected output on the client side?

Can you post a sample of the link generated on the client?
0
 

Accepted Solution

by:
WorknHardr earned 0 total points
ID: 39973811
I restarted VS2012 and now it's working
0
 

Author Closing Comment

by:WorknHardr
ID: 39985529
thx
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question