I have a Gridview with a hyperlink field. The hyperlink will open a pdf file from a folder in the root of the web if there is a corresponding file. My problem is that there may or may not be a corresponding file and if there isn't a file then a browser window opens up and the contents of the folder are displayed. This folder will be maintenanced from day to day adding and removing files. coding something that will either disable the hyperlink were there is no corresponding data or just pop up a message that there is no corresponding data to view.
I have a GridView that shows results according to user selections above it via checkboxes, dropdown lists etc. Once user clicks on a hyperlink value on one of the rows in GridView, user is taken to another page which is sort of a drill down for that line item in the GridView.
Everything works fine so far, except when the user hits the back button, user selections that filter data on the Gridview page are lost. So, I added ViewState="True" on these filter options (i.e. checkbox, dropdownlist etc.). When back button is hit selections were still cleared. How could I remedy this?
I want make one of the field in my data grid in hyperlink after I retrieve the records from the database. I have EmpId and EmpName in the gridview but I want to make the EmpName field in hyperlink so that when I click a name, I can redirect at a page based on the data of that field. How can I suppose to do it??.
I have a gridview that has a hyperlink field in one of the columns. My question is how do I can I reference the the hyperlink's datatextfield when I click on the hyperlink? The field is a PDF that is stored in the data base and I need the datatextfield to reference the record in the db.
I have 2 fields in my gridview one called ScriptType the other BagNo, when a user click the edit button, I would like the BagNo filed to be disabled if the ScriptType field is = "TTA" and enabled otherwise. How can I do this?..something along these lines see below..I am using VB..
To the hyperlink field I wish to add data from external date, and I have tried this, but it doesn't work,
Code: Protected Sub Gridview1_PreRender(ByVal sender As Object, ByVal e As EventArgs) Dim test As String = Request.QueryString("lang") For Each row As GridViewRow In GridView1.Rows If row.RowType = DataControlRowType.DataRow Then Dim grdviewLink As HyperLink = DirectCast(row.Cells(0).Controls(0), HyperLink) grdviewLink.NavigateUrl += "&lang=" & Convert.ToString(test) End If Next End Sub
I will add the code lang to the URL including the querystring
I have gridview that lists a column of hyperlinked names. A procedure is passed to get the data for the gridview. I am also pulling an ID to use once the name is clicked. Once clicked the ID is used in another procedure to populate a formview. I am having a problem getting the ID to be associated to each hyperlink name in the column and figuring out how I am going to grab the ID from the asp:hyperlinkfield and then assigning it a variable to use elsewhere. Right now I trying to create a datarow with a new attribute.
I have created a Gridview and as part of the GridView I have created an ItemTemplate which has a HyperLink field. I would like the user to possibly select a different hyperlink for each row in the Grid. I have tried using the FileUpload Control and getting the Posted.FileName property and setting this but to no avail.