Click here to Skip to main content
15,899,679 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiondata context object in web form 2010 app Pin
sc steinhayse24-Jun-12 7:58
sc steinhayse24-Jun-12 7:58 
AnswerRe: data context object in web form 2010 app Pin
Sandeep Mewara24-Jun-12 10:04
mveSandeep Mewara24-Jun-12 10:04 
Questioncustom validator for C# 2010 web app Pin
sc steinhayse24-Jun-12 7:33
sc steinhayse24-Jun-12 7:33 
AnswerRe: custom validator for C# 2010 web app Pin
Sandeep Mewara24-Jun-12 9:56
mveSandeep Mewara24-Jun-12 9:56 
AnswerRe: custom validator for C# 2010 web app Pin
jkirkerx24-Jun-12 10:23
professionaljkirkerx24-Jun-12 10:23 
QuestionParsing Error Pin
WebMaster24-Jun-12 0:33
WebMaster24-Jun-12 0:33 
AnswerRe: Parsing Error Pin
Sandeep Mewara24-Jun-12 2:57
mveSandeep Mewara24-Jun-12 2:57 
QuestionTall PDF Thumbnail, tweaking sample code, read file from disk, and not upload Pin
jkirkerx23-Jun-12 9:04
professionaljkirkerx23-Jun-12 9:04 
I need to create an image of a pdf file, so I'm shopping around for something free.

I'm giving the Tall PDF Thumbnail a spin, but making some changes. The documentation shows uploading a pdf file, and grabbing the bytes of the inputstream, writing it to a session key, and then pointing the Tall Object to the session key.

How they do it, via file upload in c#
byte[] buffer = new byte[postedFile.ContentLength];
postedFile.InputStream.Seek( 0, System.IO.SeekOrigin.Begin );
postedFile.InputStream.Read( buffer, 0, postedFile.ContentLength );
string sessionID = Session.SessionID;
Session[sessionID] = buffer;


I want to read it off the disk drive, because it's already there, but in vb
Dim uniqueKey As String = Guid.NewGuid().ToString()

Dim fileStream As FileStream = File.OpenRead(physicalPath)
Dim fileLength As Long = fileStream.Length
Dim buffer() As Byte = New Byte(fileLength) {}
fileStream.Read(buffer, 0, buffer.Length)

Context.Session.Add(uniqueKey, buffer)

In theory, bytes are bytes, regardless of how you get them, so I should be able to create the same data buffer needed to feed the Tall Object, to create a thumbnail, but I'm not able to get the object to do it's thing.

My question is, does my translation look correct, and is my theory valid here, or am I way off base on this?
Answer[solved] Pin
jkirkerx23-Jun-12 9:37
professionaljkirkerx23-Jun-12 9:37 
NewsSpeek Object Pin
thun makara23-Jun-12 2:06
thun makara23-Jun-12 2:06 
GeneralRe: Speek Object Pin
Richard MacCutchan23-Jun-12 2:23
mveRichard MacCutchan23-Jun-12 2:23 
Questionweb pages communicate with each other Pin
sc steinhayse22-Jun-12 20:24
sc steinhayse22-Jun-12 20:24 
AnswerRe: web pages communicate with each other Pin
Sandeep Mewara22-Jun-12 21:23
mveSandeep Mewara22-Jun-12 21:23 
QuestionPanel displayed from UserControl Pin
AB777122-Jun-12 7:48
AB777122-Jun-12 7:48 
AnswerRe: Panel displayed from UserControl Pin
jkirkerx22-Jun-12 10:10
professionaljkirkerx22-Jun-12 10:10 
GeneralRe: Panel displayed from UserControl Pin
AB777124-Jun-12 23:31
AB777124-Jun-12 23:31 
Questionset values for session variables Pin
sc steinhayse22-Jun-12 5:19
sc steinhayse22-Jun-12 5:19 
AnswerSession variable overview Pin
David Mujica22-Jun-12 6:05
David Mujica22-Jun-12 6:05 
AnswerRe: set values for session variables Pin
jkirkerx22-Jun-12 6:37
professionaljkirkerx22-Jun-12 6:37 
QuestionAssigning the SelectedValue of Dropdownlist within Gridview to a datatable field Pin
sheringkapoting22-Jun-12 1:59
sheringkapoting22-Jun-12 1:59 
AnswerRe: Assigning the SelectedValue of Dropdownlist within Gridview to a datatable field Pin
Sanjay Kunjam22-Jun-12 2:57
Sanjay Kunjam22-Jun-12 2:57 
GeneralRe: Assigning the SelectedValue of Dropdownlist within Gridview to a datatable field Pin
sheringkapoting22-Jun-12 3:21
sheringkapoting22-Jun-12 3:21 
GeneralRe: Assigning the SelectedValue of Dropdownlist within Gridview to a datatable field Pin
AshishChaudha29-Jun-12 22:30
AshishChaudha29-Jun-12 22:30 
QuestionC# session variable Pin
sc steinhayse21-Jun-12 12:05
sc steinhayse21-Jun-12 12:05 
AnswerRe: C# session variable Pin
jkirkerx21-Jun-12 12:21
professionaljkirkerx21-Jun-12 12:21 

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.