Click here to Skip to main content
16,010,553 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: javascript for convert english to french Pin
Pete O'Hanlon23-Jul-08 23:28
mvePete O'Hanlon23-Jul-08 23:28 
Questionlooking for example designs for layout of website Pin
eyeseetee23-Jul-08 0:09
eyeseetee23-Jul-08 0:09 
AnswerRe: looking for example designs for layout of website Pin
Samir NIGAM23-Jul-08 0:17
Samir NIGAM23-Jul-08 0:17 
AnswerRe: looking for example designs for layout of website Pin
Paddy Boyd23-Jul-08 0:36
Paddy Boyd23-Jul-08 0:36 
QuestionAccessing values of Xaml controls in the web site Pin
ACMA_198022-Jul-08 23:55
ACMA_198022-Jul-08 23:55 
AnswerRe: Accessing values of Xaml controls in the web site Pin
eyeseetee23-Jul-08 0:04
eyeseetee23-Jul-08 0:04 
QuestionWebCam & MicroPhone support in Silverlight 2.0 Beta 2.0 Pin
248912822-Jul-08 23:53
248912822-Jul-08 23:53 
Questionhow to consume RSS feeds for ASP.NET? Pin
Y.S.A22-Jul-08 23:49
Y.S.A22-Jul-08 23:49 
I have developed an asp.net page that used to download videos been uploaded by the user, the code for that page as following:

=================================================================================================

]]>

<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server" xmlns:asp="#unknown">


List of Available Vedios to Download
<asp:gridview id="dgvvediocollection" runat="server" allowpaging="True" autogeneratecolumns="False">
BackColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black"
GridLines="Vertical" Width="80%" EmptyDataText="No Records Found">
<pagersettings firstpagetext="First" lastpagetext="Last" nextpagetext="Next" previouspagetext="Prev">
<footerstyle backcolor="#CCCCCC">
<columns> <asp:boundfield datafield="filename" headertext="Vedio Name">
<controlstyle width="30%">
<itemstyle horizontalalign="Center" width="40%">
<headerstyle horizontalalign="Center">

<asp:boundfield datafield="type" headertext="Vedio Type">
<controlstyle width="30%">
<itemstyle horizontalalign="Center" width="40%">
<headerstyle horizontalalign="Center">

<asp:buttonfield buttontype="Button" commandname="download" headertext="Action" text="Download">
<controlstyle backcolor="LightSkyBlue" font-bold="True" forecolor="Black">
<itemstyle width="20%">

<selectedrowstyle backcolor="#000099" font-bold="True" forecolor="White">
<pagerstyle backcolor="White" forecolor="Black" horizontalalign="Right">
<headerstyle backcolor="Black" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="#CCCCCC">







====================================================================================

Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Data.SqlClient
Imports System.IO

Partial Class PodCost
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) Then
Dim User As String = Session("UserName").ToString()
BindVedioData()
End If
End Sub

Protected Sub dgvvediocollection_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles dgvvediocollection.RowCommand
If (e.CommandName = "download") Then
Dim i As Integer = Convert.ToInt32(e.CommandArgument)
Dim str As String = dgvvediocollection.Rows(i).Cells(0).Text
downloadfile(str)
End If
End Sub
Private Sub BindVedioData()
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("dbconnection").ConnectionString)
Dim str As String = "select substring(PlayListUrl,8,len(PlayListUrl)) as filename,VideoType as type from PlayList"
Dim da As SqlDataAdapter = New SqlDataAdapter(str, conn)
Dim ds As DataSet = New DataSet()
da.Fill(ds)
If (ds.Tables(0).Rows.Count > 0) Then
dgvvediocollection.DataSource = ds.Tables(0)
dgvvediocollection.DataBind()
End If
End Sub
Private Sub downloadfile(ByVal filename As String)
Dim filepath As String = Server.MapPath("Videos") & "\" & filename
If Not filepath Is Nothing Then
If File.Exists(filepath) Then
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", _
"attachment; filename=""" & filename & """")
Response.Flush()
Response.WriteFile(filepath)
End If
End If
End Sub

Protected Sub dgvvediocollection_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles dgvvediocollection.PageIndexChanging
dgvvediocollection.PageIndex = e.NewPageIndex
BindVedioData()
End Sub
End Class

===================================================================================================

please help to write RSS feed for that code.
Thanks a lot
AnswerRe: how to consume RSS feeds for ASP.NET? Pin
eyeseetee23-Jul-08 0:05
eyeseetee23-Jul-08 0:05 
GeneralRe: how to consume RSS feeds for ASP.NET? Pin
Y.S.A23-Jul-08 0:40
Y.S.A23-Jul-08 0:40 
QuestionGet html of aspx page and convert to pdf including content in scroll Pin
Member 318636522-Jul-08 23:46
Member 318636522-Jul-08 23:46 
AnswerRe: Get html of aspx page and convert to pdf including content in scroll Pin
N a v a n e e t h23-Jul-08 0:09
N a v a n e e t h23-Jul-08 0:09 
GeneralRe: Get html of aspx page and convert to pdf including content in scroll Pin
Member 318636523-Jul-08 1:07
Member 318636523-Jul-08 1:07 
AnswerRe: Get html of aspx page and convert to pdf including content in scroll Pin
Arindam Tewary23-Jul-08 3:55
professionalArindam Tewary23-Jul-08 3:55 
GeneralRe: Get html of aspx page and convert to pdf including content in scroll Pin
Member 318636523-Jul-08 22:24
Member 318636523-Jul-08 22:24 
QuestionItems displayed in Datalist are wrapping Pin
meeram39522-Jul-08 23:31
meeram39522-Jul-08 23:31 
GeneralTreeView Menu and Menu Editor Pin
Brady Kelly22-Jul-08 23:03
Brady Kelly22-Jul-08 23:03 
QuestionHow to encrypt address bar? Pin
Sanjay Kunjam22-Jul-08 23:01
Sanjay Kunjam22-Jul-08 23:01 
AnswerRe: How to encrypt address bar? Pin
Anand Desai22-Jul-08 23:10
Anand Desai22-Jul-08 23:10 
GeneralRe: How to encrypt address bar? Pin
Sanjay Kunjam22-Jul-08 23:32
Sanjay Kunjam22-Jul-08 23:32 
GeneralRe: How to encrypt address bar? Pin
Anand Desai22-Jul-08 23:56
Anand Desai22-Jul-08 23:56 
GeneralRe: How to encrypt address bar? Pin
Anand Desai23-Jul-08 0:00
Anand Desai23-Jul-08 0:00 
GeneralRe: How to encrypt address bar? Pin
Sanjay Kunjam23-Jul-08 1:29
Sanjay Kunjam23-Jul-08 1:29 
GeneralRe: How to encrypt address bar? Pin
Anand Desai23-Jul-08 1:44
Anand Desai23-Jul-08 1:44 
AnswerRe: How to encrypt address bar? Pin
N a v a n e e t h23-Jul-08 0:06
N a v a n e e t h23-Jul-08 0:06 

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.