Click here to Skip to main content
15,921,941 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: in C# Asp.net How to send Email with images by using template approach Pin
prasadSn20036-Jul-09 0:42
prasadSn20036-Jul-09 0:42 
GeneralRe: in C# Asp.net How to send Email with images by using template approach Pin
prasadSn20037-Jul-09 3:21
prasadSn20037-Jul-09 3:21 
QuestionSave Data of TextBox those are Dynamically created Pin
KhandelwalA6-Jul-09 0:31
KhandelwalA6-Jul-09 0:31 
AnswerRe: Save Data of TextBox those are Dynamically created Pin
jaysaran6-Jul-09 1:29
jaysaran6-Jul-09 1:29 
AnswerRe: Save Data of TextBox those are Dynamically created Pin
Abhijit Jana6-Jul-09 9:34
professionalAbhijit Jana6-Jul-09 9:34 
QuestionHow to get live video stream from webcam in webpage? Pin
Digubha5-Jul-09 23:01
Digubha5-Jul-09 23:01 
AnswerRe: How to get live video stream from webcam in webpage? Pin
Manas Bhardwaj5-Jul-09 23:47
professionalManas Bhardwaj5-Jul-09 23:47 
QuestionProblem Reading PDF Pin
alasaadi5-Jul-09 22:48
alasaadi5-Jul-09 22:48 
Hi guys! I am developing a page that gets a PFD file from a FTP directory and then reads it using the IO stream and then output it to the use in the same page.

I have built the page, but I am getting an error everytime I try it that says "there was an error reading this document".

Well, this is the code I am using:

Const username As String = "pdfuser"
Const password As String = "pdfpass"

Dim URI As String = "ftp://192.168.20.10/PDF/9006.pdf"

Dim ftpReq As FtpWebRequest = DirectCast(System.Net.WebRequest.Create(URI), FtpWebRequest)
ftpReq.Credentials = New NetworkCredential(username, password)
ftpReq.UsePassive = False
ftpReq.UseBinary = True
ftpReq.Method = WebRequestMethods.Ftp.DownloadFile

Dim ftpRes As FtpWebResponse = DirectCast(ftpReq.GetResponse, FtpWebResponse)
Dim responseStream As IO.Stream = ftpRes.GetResponseStream
'loop to read & write to file
Response.ContentType = "Application/pdf"
Dim FileSize As Long
FileSize = 1024
Dim Buffer(CInt(FileSize)) As Byte
Dim count As Integer = 0
Do
count = responseStream.Read(Buffer, 0, Buffer.Length)
Response.BinaryWrite(Buffer)
Response.Flush()
Loop Until count = 0 'see Note(1)
Response.End()

Please help..

Abdulsalam Alasaadi
Multimedia & Web Spacialist
http://www.zeroonebahrain.com

QuestionA pdf on an Iframe Pin
LucBite5-Jul-09 22:38
LucBite5-Jul-09 22:38 
AnswerRe: A pdf on an Iframe Pin
Abhijit Jana5-Jul-09 23:05
professionalAbhijit Jana5-Jul-09 23:05 
GeneralRe: A pdf on an Iframe Pin
LucBite6-Jul-09 0:16
LucBite6-Jul-09 0:16 
QuestionTo Access the UserControl in App_Code Pin
jaysaran5-Jul-09 21:10
jaysaran5-Jul-09 21:10 
QuestionJava Script issue Pin
Amit Patel19855-Jul-09 20:30
Amit Patel19855-Jul-09 20:30 
AnswerRe: Java Script issue Pin
SeMartens5-Jul-09 20:36
SeMartens5-Jul-09 20:36 
GeneralRe: Java Script issue Pin
Amit Patel19855-Jul-09 21:47
Amit Patel19855-Jul-09 21:47 
GeneralRe: Java Script issue Pin
SeMartens5-Jul-09 21:52
SeMartens5-Jul-09 21:52 
GeneralRe: Java Script issue Pin
engg_sukreet6-Jul-09 2:09
engg_sukreet6-Jul-09 2:09 
GeneralRe: Java Script issue Pin
SeMartens6-Jul-09 2:22
SeMartens6-Jul-09 2:22 
AnswerRe: Java Script issue Pin
Blue_Boy5-Jul-09 21:57
Blue_Boy5-Jul-09 21:57 
GeneralRe: Java Script issue Pin
Amit Patel19855-Jul-09 22:58
Amit Patel19855-Jul-09 22:58 
GeneralRe: Java Script issue Pin
Blue_Boy5-Jul-09 23:08
Blue_Boy5-Jul-09 23:08 
Questionchange the content of the page without refreshing Pin
slSoftware5-Jul-09 20:29
slSoftware5-Jul-09 20:29 
AnswerRe: change the content of the page without refreshing Pin
SeMartens5-Jul-09 20:34
SeMartens5-Jul-09 20:34 
GeneralRe: change the content of the page without refreshing Pin
slSoftware5-Jul-09 20:38
slSoftware5-Jul-09 20:38 
GeneralRe: change the content of the page without refreshing Pin
Abhijit Jana5-Jul-09 20:58
professionalAbhijit Jana5-Jul-09 20:58 

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.