How to convert DataTable row to a hyperlink RRS feed

  • Question

  • I have a DataTable row which needs to be converted to a hyperlink to redirect to another page. Below is how I am setting the row

     DataRow dr = reportData.NewRow();
     dr.SetField(dcNumber, type.GetProperty("Number").GetValue(r, null));

    I want to convert the above row to a hyperlink.

    Any help will be appreciated


    • Moved by CoolDadTx Tuesday, November 12, 2019 2:54 PM ASP.NET related
    Monday, November 11, 2019 3:08 AM

All replies

  • Do you want to make just one row of DataTable.Rows collection filled with data and each cell of the only that row to be interpreted as a href?
    Actually not clear what your looking for..

    If so, then you can specify the Control type for columns only.

    And this should also be clarified is it WinForms or ASP code?

    "I = I + 1" .. Isn't it boolshit?

    Monday, November 11, 2019 10:53 AM
  • This is an asp.net mvc application. Yes I want just one row of DataTable.Rows collection filled with data and each cell of the only that row to be interpreted as a href


    Monday, November 11, 2019 11:05 PM
  • Hi denkyira,

    Thank you for posting here.

    I note that your question had been solved in ASP.NET forum, so I suggest you post the answer here and mark it, so that it will help other members to find the solution quickly if they face a similar issue.

    Thank you for your support.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 12, 2019 9:32 AM