Click here to Skip to main content
15,886,059 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to Disable back button Pin
awedaonline25-Jan-10 1:09
awedaonline25-Jan-10 1:09 
GeneralRe: How to Disable back button Pin
Jain Vijay25-Jan-10 1:24
Jain Vijay25-Jan-10 1:24 
GeneralRe: How to Disable back button Pin
awedaonline25-Jan-10 2:15
awedaonline25-Jan-10 2:15 
GeneralRe: How to Disable back button Pin
Jain Vijay26-Jan-10 19:11
Jain Vijay26-Jan-10 19:11 
GeneralRe: How to Disable back button Pin
Samarjeet Singh@india25-Jan-10 4:03
Samarjeet Singh@india25-Jan-10 4:03 
GeneralRe: How to Disable back button Pin
Jain Vijay26-Jan-10 17:57
Jain Vijay26-Jan-10 17:57 
GeneralRe: How to Disable back button Pin
Samarjeet Singh@india26-Jan-10 19:09
Samarjeet Singh@india26-Jan-10 19:09 
QuestionHow to link to PDF files from datalist? [modified] Pin
Meax24-Jan-10 19:06
Meax24-Jan-10 19:06 
i like to display report names in a data list and when the user clicks open the corresponding PDF file.

all the reports are in PDF format.

Report 1
Report 2
Report 3
Report 4
Report 5

how can i do this?

i am saving pdf files path in database(http://www.mysite.com/reports/Report1.pdf)

my current code shows the report name but when i click it doesn't go anywhere.

<br />
<asp:datalist id="DL1" runat="server" ItemStyle-BackColor="#c7c7c6" ItemStyle-BorderColor="#c7c7c6" CssClass="Titles"><br />
    <ItemTemplate> <br />
     <asp:HyperLink Runat ="server" NavigateUrl ='<%#DataBinder.Eval(Container.DataItem, "ReportURL")%>' ID="Hyperlink1"> <br />
          <%#DataBinder.Eval(Container.DataItem, "ReportName")%> <br />
     </asp:HyperLink> <br />
     </ItemTemplate> <br />
   </asp:datalist> <br />



code behind

<br />
 Private Sub GetReports()<br />
<br />
        Dim objConnection As SqlConnection = New _<br />
        SqlConnection(ConfigurationManager.ConnectionStrings("MyDbConn").ToString())<br />
<br />
        objConnection.Open()<br />
<br />
        Dim myCommand As New System.Data.SqlClient.SqlCommand()<br />
        myCommand.Connection = objConnection<br />
<br />
        myCommand.CommandText = "SelectReports"<br />
        myCommand.CommandType = CommandType.StoredProcedure<br />
<br />
       <br />
        Dim param As New System.Data.SqlClient.SqlParameter()<br />
<br />
        Dim myAdapter As New SqlDataAdapter(myCommand)<br />
<br />
        myAdapter.Fill(DataSetReports)<br />
<br />
        <br />
        Dim reader As SqlDataReader = myCommand.ExecuteReader()<br />
<br />
         DL1.DataSource = DataSetReports<br />
<br />
        DL1.DataBind()<br />
        objConnection.Close()<br />
<br />
    End Sub<br />


modified on Monday, January 25, 2010 1:21 AM

AnswerRe: How to link to PDF files from datalist? Pin
April Fans25-Jan-10 0:53
April Fans25-Jan-10 0:53 
QuestionUsing HttpsWebRequest and HttpsWebResponse in .NET Pin
sumit703424-Jan-10 19:05
sumit703424-Jan-10 19:05 
AnswerRe: Using HttpsWebRequest and HttpsWebResponse in .NET Pin
N a v a n e e t h24-Jan-10 19:59
N a v a n e e t h24-Jan-10 19:59 
GeneralRe: Using HttpsWebRequest and HttpsWebResponse in .NET Pin
sumit703424-Jan-10 20:14
sumit703424-Jan-10 20:14 
QuestionASP.net Search Engine Pin
nayansharma124-Jan-10 18:13
nayansharma124-Jan-10 18:13 
AnswerRe: ASP.net Search Engine Pin
N a v a n e e t h24-Jan-10 19:57
N a v a n e e t h24-Jan-10 19:57 
GeneralRe: ASP.net Search Engine Pin
nayansharma18-Feb-10 15:14
nayansharma18-Feb-10 15:14 
QuestionCan a Java application call a DotNet WCF service? Pin
ashishtango24-Jan-10 17:25
ashishtango24-Jan-10 17:25 
AnswerRe: Can a Java application call a DotNet WCF service? Pin
Dinesh Mani24-Jan-10 18:10
Dinesh Mani24-Jan-10 18:10 
GeneralRe: Can a Java application call a DotNet WCF service? Pin
ashishtango24-Jan-10 22:15
ashishtango24-Jan-10 22:15 
GeneralRe: Can a Java application call a DotNet WCF service? Pin
Dinesh Mani25-Jan-10 1:20
Dinesh Mani25-Jan-10 1:20 
AnswerRe: Can a Java application call a DotNet WCF service? Pin
April Fans25-Jan-10 0:56
April Fans25-Jan-10 0:56 
QuestionGridViews and Properties... Pin
Illegal Operation24-Jan-10 13:13
Illegal Operation24-Jan-10 13:13 
AnswerRe: GridViews and Properties... Pin
nagendrathecoder24-Jan-10 18:28
nagendrathecoder24-Jan-10 18:28 
GeneralRe: GridViews and Properties... Pin
Illegal Operation24-Jan-10 18:46
Illegal Operation24-Jan-10 18:46 
GeneralRe: GridViews and Properties... Pin
nagendrathecoder24-Jan-10 19:03
nagendrathecoder24-Jan-10 19:03 
GeneralRe: GridViews and Properties... Pin
Illegal Operation26-Jan-10 12:34
Illegal Operation26-Jan-10 12:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.