Code Behind Page Page /Admin/QuestionImage.aspx.cs (C#)
Used by Page /Admin/QuestionImage.aspx (C#)
1: using System;  
2: using System.Data;  
3: using System.Configuration;  
4: using System.Collections;  
5: using System.Web;  
6: using System.Web.Security;  
7: using System.Web.UI;  
8: using System.Web.UI.WebControls;  
9: using System.Web.UI.WebControls.WebParts;  
10: using System.Web.UI.HtmlControls;  
11: using QuizNetOnline.Logic;  
12:   
13: public partial class Admin_QuestionImage : System.Web.UI.Page  
14: {  
15:     QuestionImage QuestionImage;  
16:     protected void Page_Load(object sender, EventArgs e)  
17:     {  
18:         if (FileUpload.HasFile)  
19:         {  
20:             QuestionImage = new QuestionImage();  
21:             QuestionImage.QuestionId = Convert.ToInt32(Request.QueryString["questionid"].ToString());  
22:             QuestionImage.Image = FileUpload.FileBytes;  
23:             QuestionImage.Save();  
24:         }  
25:     }  
26: }  

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.