设为首页】 【加入收藏】 【网站地图】 【商品折扣
娱乐一生 娱乐明星
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
首页  |  java  |  .NET  |  C/C++  |  网页技术  |  php  |  asp  |  delphi  |  VC  |  VB开发  |  游戏开发  |  软件工程  |  Power Builder  |  Linux开发  |  Windows开发技巧
当前位置:首页 >> 开发实例 >> 从一个舆论调查的制作谈面向对象的编程思路(五)

从一个舆论调查的制作谈面向对象的编程思路(五) -

好了,现在万事俱备,只欠东风了,让我们看看现在做一个舆论调查多么简单:

file : vote.a x


<%@ Page language="c#" Codebehind="vote.c quot; AutoEventWireup="false" Inherits="Football.vote" %>

<html>
 lt;head>
 lt;title>532.com.cn --- 舆论调查 ---</title>
 lt;link rel=" tylesheet" href=" tyle/style.c quot; type="text/c quot gt;
 
 lt;/head>
 lt ody>
 
 lt;form method=" ost" runat=" erver" gt;
 lt;table width=400 height=300 align=center>
 lt;tr>
 lt;td cla =cn valign=top align=center> lt gt;调查题目:
 lt;a :label id="lblSurveyTitle" runat=Server cla =c gt lt;/a :label>
 lt;/td>
 lt;/tr>
 lt;tr>
 lt;td alin=center>
 lt;a :image id="imgSurvey" runat=Server> lt;/a :image> 
 lt;/td>
 lt;/tr>
 lt;tr>
 lt;td align=center>
 lt;i ut type=button onclick="window.close() quot; value="关闭此窗口" gt;
 lt;/td>
 lt;/tr>
 lt;/table>
 lt;/form>
 
 lt;/body>
</html>

file: vote.cs
name ace Football
{
 using System;
 using System.Collectio 
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.We 
 using System.Web.Se io tate;
 using System.Web.UI;
 using System.Web.UI.WebControl 
 using System.Web.UI.HtmlControl 



 /// < ummary>
 /// ummary description for vote.
 /// </summary>
 ublic cla  vote : System.Web.UI.Page
 #123;
 rotected System.Web.UI.WebControls.Image imgSurvey;
 rotected System.Web.UI.WebControls.Label lblSurveyTitle;

 rivate string m_strSurveyID ;
 rivate int m_intVoteID ;
 ublic vote()
 #123;
 age.Init += new System.EventHandler(Page_Init);
 #125;

 rotected void Page_Load(object sender, EventArgs e)
 #123;
 if (!I ostBack)
 #123;
 //
 // Evals true first time browser hits the page
 //
 #125;
 #125;

 rotected void Page_Init(object sender, EventArgs e)
 #123;
 //
 // CODEGEN: This call is required by the A + Windows Form Designer.
 //
 InitializeComponent();
 Init() ;
 #125;

 /// < ummary>
 /// Required method for Designer su ort - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 rivate void InitializeComponent()
 #123;
 this.Load += new System.EventHandler (this.Page_Load);
 #125;

 rivate void Init()
 #123;
 m_strSurveyID = Request[" urveyid"].ToString() ;
 FootballSurvey mySurvey = new FootballSurvey() ;

 try
 #123;
 m_intVoteID = Request["vote"].ToInt32() ;
 mySurvey.LoadFromDatabase(m_strSurveyID) ;
 lblSurveyTitle.Text = mySurvey.Title ;
 if (m_intVoteID < mySurvey.Items.Count)
 #123;
 mySurvey.Vote(m_intVoteID) ;
 #125;

 mySurvey.CreateResultImage(Server.Ma ath(" urvey.jpg") ,
 



 

娱乐图摘

更多 >>

靓丽清纯美女meimei

美女私房全裸照
导演劝女演员脱衣服(视频)

大胆火辣人体艺术写真(图)

黑丝妹妹热辣诱惑-丝袜美女妹妹

PLMM 漂亮妹妹图集-妹妹图库

全球美女图库-美女集中营

52MM 我爱漂亮妹妹-制服妹妹诱惑

图王图库-世界美女明星图片资料库
美女写真集锦

激情两性-解密性生活
浴室MM湿身内衣诱惑
邻家小妹洗澡被偷拍(视频)

热点文章

更多

· A .NET验证控件祥解(转)
· A .net:Literal控件用法
· A .NET中文件上传下载方法集合
· A .NET中Cookie编程的基础知识(3)
· A .net 验证码(C#)
· 在A .Net中创建动态表格
· 设计A .NET新闻管理系统
· 将A .NET页面内的数据导出到Excel&nbs
· A .Net2.0 GridView&n
· 利用A .NET设计FTP文件上传

热点文章

更多