Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:677208
More Search Options
RSS Available
Matching Posts
Re: Creating Re-usable code!
Hmmmm yep really weird!! This is my function and if I run the FU through this to check it then save the file (Gif or Jpeg!) it just saves it corrupted or should I say 0kb .. no size public bool ImageCheck_CorrectFileType(FileUpload TheFileUpload) { FileUpload fuTest = TheFileUpload; System.IO.BinaryReader r = new System.IO.BinaryReader(fuTest.PostedFile.InputStream); string fileclass = string .Empty; byte buffer; try { buffer = r.ReadByte(); fileclass = buffer.ToString(); buffer = r.ReadByte(); fileclass
Posted to
Web Forms
(Forum)
by
dotnet_lee
on 2/9/2009
Re: Creating Re-usable code!
PROBLEM!! For some reason if I use this, the file that gets uploaded is 0KB??? I simply run it through the checker, and if its ok .saveas ... The file uploads with the correct name / fileformat but its 0KB... Just nothing?? Any ideas why??
Posted to
Web Forms
(Forum)
by
dotnet_lee
on 2/9/2009
Re: Creating Re-usable code!
Awesome thanks... Its so obvious now! Thanks again
Posted to
Web Forms
(Forum)
by
dotnet_lee
on 2/8/2009
Creating Re-usable code!
I'm really trying to make my code as re-usable as possible... But on some things I just get a bit stuck... For example... I have 4 FileUploads on one page, and for each one I need to check firstly the filesize is not over a certain limit and secondly the filetype is correct - Now its exactly the same code for each upload but I can't figure out how to make one method to work for all to save me writing it all out 4 times?? Heres what I have so far for one of them as an example... protected
Posted to
Web Forms
(Forum)
by
dotnet_lee
on 2/7/2009
Re: FileUpload ContentType trickery
Here you go... this should help some of you out 208207 = .doc 7173 = .gif 255216 = .jpg 6677 = .bmp 13780 = .png
Posted to
Web Forms
(Forum)
by
dotnet_lee
on 2/7/2009
Re: Strange Question... JavaScript / ASP.NET
Thanks for the reply.. I didn't explain myself very well... lol! I need to fire the JavaScript from the .NET as well... So say I had a JS function that I wanted to fire on page load and straight away pass the values to another function, redirect the page and use the value. Basically I have a lot of sites for different people, and want to write a little bit of code that would go out and check when they last updated the site using this http://sansaglit.multiply.com/journal/item/8/Find_out_when_a_web_page_was_last_updated
Posted to
Client Side Web Development
(Forum)
by
dotnet_lee
on 2/6/2009
Strange Question... JavaScript / ASP.NET
I was wondering if anyone knew if its possible to execute JavaScript programatically and retreive the results using asp.net and use them to do a certain task??
Posted to
Client Side Web Development
(Forum)
by
dotnet_lee
on 2/6/2009
Re: New AntiXss Library? Any easy to follow tutorials?
Perfect... Exactly what I was looking for... Thanks
Posted to
Getting Started
(Forum)
by
dotnet_lee
on 2/5/2009
Re: Anyone Know Of A Good Image Upload Control??
Thanks for the reply... I know about both but was looking for something that had the features I posted above?
Posted to
Component Discussions
(Forum)
by
dotnet_lee
on 2/4/2009
Re: Anyone Know Of A Good Image Upload Control??
Blimey... I thought I would have quite a few replies to this?? Anyone....??
Posted to
Component Discussions
(Forum)
by
dotnet_lee
on 2/4/2009
Page 1 of 19 (189 items) 1
2
3
4
5
Next >
...
Last »
TechNet Edge:
Joachim Nässlander on Live Migration
ASP.NET:
T4MVC 2.6: MVC 2 Areas support
ASP.NET:
Script# Update - v0.5.5.0
Channel 10:
Difference between DirectX 10 and DirectX 11
Channel 10:
WHS Power Pack 3 Arrives
Channel 10:
ASUS Brings GUI to BIOS
ASP.NET:
Microsoft AJAX CDN – Now with SSL Support
Channel 9:
TWC9: XAML tools, Silverlight for Live Writer, Surface SDK,
ASP.NET:
PDC09 Talk: Building Amazing Business Applications with Silverlight 4, RIA Services and Visual Studio 2010 – Now in Visual Basic!!
Channel 9:
C9 Conversations: Brian Beckman on Complexity [C9 Conversations: Brian Beckman on Complexity]
Channel 10:
Black Friday Deals on Windows 7 Machines
Channel 10:
Holiday Shopping on Bing Cashback = Big Online Savings
Channel 10:
Black Friday Deals at the Microsoft Store
Channel 10:
Incredible Black Friday Deal: Windows 7 Notebook for $197
ASP.NET:
Presenting in Europe Next Week
TechNet Edge:
AlignIT IT Manager Podcast #30 - Straight Talk about Windows 7
WindowsClient:
You know your post rate has gone down...
Silverlight:
Geek Profiles – Scott Guthrie
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 9 of 13
TechNet Edge:
Managing Your Virtual World - Tech Focus November 2009 Part 2
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online