array of hyperlinks-->
-
Hi all, I would like to share with u all a problem which I am facing at the moment.I am using a gridview which I am populating using an sqldataadapter(through code and not statically).Now What I need to do is to change one of the columns into hyperlink.For instance the one we have in emails.When I click on the different hyperlinks within the same column I should be redirected to a common page but with different values through query string.For this I am trying to create an array of hyperlinks.But I am getting problem while initializing it.I am doing something like this---
dim hf() as hyperlink=???
while i
hf(i).navigateurl="....?value="+i.tostring
hf(i).text=......
gridview1.rows(i).cells(0).controls(0).add(hf(i))
end whileBut I am facing problem in the first line that is the initialization part.Please help me out with this.:confused:
-
Hi all, I would like to share with u all a problem which I am facing at the moment.I am using a gridview which I am populating using an sqldataadapter(through code and not statically).Now What I need to do is to change one of the columns into hyperlink.For instance the one we have in emails.When I click on the different hyperlinks within the same column I should be redirected to a common page but with different values through query string.For this I am trying to create an array of hyperlinks.But I am getting problem while initializing it.I am doing something like this---
dim hf() as hyperlink=???
while i
hf(i).navigateurl="....?value="+i.tostring
hf(i).text=......
gridview1.rows(i).cells(0).controls(0).add(hf(i))
end whileBut I am facing problem in the first line that is the initialization part.Please help me out with this.:confused:
Try this... Dim hf As HyperLink() = New HyperLink(100) {}
The miracle is this--the more we share, the more we have.
-
Try this... Dim hf As HyperLink() = New HyperLink(100) {}
The miracle is this--the more we share, the more we have.
Hi Gaurav, I tried it,but it is showing me the same error "Object reference not set to an instance of an object!" I dont know what to do.I have a deadline to meet.Going crazy.Plz help me out !! :((