Click here to Skip to main content
   

ASP.NET

 
GeneralRe: related to itext sharp PinmemberMember 97985416-Feb-13 20:21 
GeneralRe: related to itext sharp PinmemberMember 97985416-Feb-13 19:08 
Answerrelated to itext sharp-iText use for commercial purpose PinmemberAbhishek Pant6-Feb-13 20:07 
AnswerRe: related to itext sharp PinmvpSandeep Mewara2-Feb-13 1:24 
QuestionDisplay image using handler.ashx what wrong my code PinmemberMichael511931-Jan-13 21:43 
AnswerRe: Display image using handler.ashx what wrong my code PinmemberRichard Deeming1-Feb-13 3:17 
GeneralRe: Display image using handler.ashx what wrong my code PinmemberMichael51191-Feb-13 5:16 
GeneralRe: Display image using handler.ashx what wrong my code PinmemberRichard Deeming1-Feb-13 6:36 
If you want to use a cookie instead of a query-string value, change your Image to:
<Image ID="Image1" runat="server" ImageUrl="Handler.ashx" Height="150px" Width="150px"/>
and change the start of the ProcessRequest method to:
var cookie = context.Request.Cookies["userid"];
if (null == cookie) throw new HttpException(404, "Cookie not found.");
string imageid = cookie.Value;
NB: You'll still need to use a parameterized command to avoid SQL injection. Cookie values can be altered by the user almost as easily as query-string values.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Display image using handler.ashx what wrong my code PinmemberMichael51191-Feb-13 6:58 
GeneralRe: Display image using handler.ashx what wrong my code PinmemberMichael51191-Feb-13 8:03 
GeneralRe: Display image using handler.ashx what wrong my code PinmemberRichard Deeming1-Feb-13 9:12 
GeneralRe: Display image using handler.ashx what wrong my code PinmemberMichael51198-Feb-13 21:10 
GeneralRe: Display image using handler.ashx what wrong my code PinmemberRichard Deeming11-Feb-13 2:29 
QuestionImagesIn Gridview PinmemberMember 941611331-Jan-13 21:13 
QuestionImporting Excel into Gridview, doesn't import all rows PinmemberCraist31-Jan-13 9:29 
AnswerRe: Importing Excel into Gridview, doesn't import all rows PinmemberCraist31-Jan-13 10:22 
QuestionWeb Pages Authentication PinmemberJassim Rahma30-Jan-13 22:22 
AnswerRe: Web Pages Authentication PinmvpRahul Rajat Singh30-Jan-13 23:14 
QuestionAuthentication with database MVC4 PinmemberAghaKhan30-Jan-13 21:44 
QuestionAutocomplete List hides behind Grid's horizontal scrollbar PinmemberPonka_developer30-Jan-13 13:01 
AnswerRe: Autocomplete List hides behind Grid's horizontal scrollbar Pinmemberjkirkerx30-Jan-13 13:50 
QuestionMVC 4 & jquery [modified] PinmemberCollin Jasnoch29-Jan-13 5:39 
QuestionHow to create and get the user input in alert message in asp.net webservice PinmemberRocky2327-Jan-13 23:22 
AnswerRe: How to create and get the user input in alert message in asp.net webservice PinmvpSandeep Mewara28-Jan-13 0:28 
AnswerRe: How to create and get the user input in alert message in asp.net webservice PinmemberAli Al Omairi(Abu AlHassan)28-Jan-13 4:41 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150414.1 | Last Updated 19 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid