⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apply.aspx

📁 asp.net技术内幕的书配源码
💻 ASPX
字号:
<!-- #INCLUDE Virtual="~/site/includes/header.aspx" -->

<script language="C#" runat=server>
string  intJobID;

void Page_Load(Object sender , EventArgs e) 
{
  if (!IsPostBack )
  {
    intJobID = Request.QueryString[ "id" ];
    ViewState[ "jobID" ] = intJobID;
  }
  else
  {
    intJobID = ViewState[ "jobID" ].ToString();
  }
}

void Button_Click( object s, EventArgs e )
{
   SqlConnection conJobs;
   string  strConString;
   SqlCommand cmdInsert;

  if ( IsValid )
  {
  strConString = ConfigurationSettings.AppSettings[ "constring" ];
  conJobs = new SqlConnection( strConString );
  cmdInsert = new SqlCommand( "addApplication", conJobs );
  cmdInsert.CommandType = CommandType.StoredProcedure;
  cmdInsert.Parameters.Add( "@from", Page.User.Identity.Name );
  cmdInsert.Parameters.Add( "@jobID", intJobID );
  cmdInsert.Parameters.Add( "@message", txtMessage.Text );
  conJobs.Open();
  cmdInsert.ExecuteNonQuery();
  conJobs.Close();
  Response.Redirect(string.Format( "~/site/job.aspx?id={0}", intJobID ) );
  }
}

</Script>

<myControls:Header
  PageTitle="Enquire"
  Runat="Server" />

<form runat="Server">

<myControls:UserLinks
  Runat="Server" />
<br clear="all">
Enter a message to send with your resume in the text box below:
<br>
<asp:TextBox
  ID="txtMessage"
  TextMode="Multiline"
  Columns="80"
  Rows="5"
  CssClass="formfield"
  Runat="Server" />
<br>
<asp:Button
  Text="Apply!"
  OnClick="Button_Click"
  Runat="Server" />

</form>
<myControls:Footer
  Runat="Server" />

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -