Anonymous
Anonymous asked in 電腦與網際網路程式設計 · 5 years ago

急!(3)有一段程式看不懂 可以幫我付註解嗎?

using System;

using System.Collections.Generic;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Data.SqlClient;

using System.Data;

using System.Security.Cryptography;

using System.Text;

public partial class Student_Region : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

//clsFunction.Check.Check_Login_ID_And_PW();

if (IsPostBack) { return; }

fn_Department();

if (string.IsNullOrEmpty(Request["no"]))

{

btnAddSave.Visible = true;

btnEditSave.Visible = false;

lblTitle.Text = "新增";

}

else

{

btnAddSave.Visible = false;

btnEditSave.Visible = true;

lblTitle.Text = "編輯";

txtStu_No.ReadOnly = true;

txtStu_No.Enabled = false;

fn_Show_Data();

}

}

3 Answers

Rating
  • 5 years ago
    Favorite Answer

    if (string.IsNullOrEmpty(Request["no"])) //這段是如果有帶no這個參數 作編輯動作沒帶的話作新增

    {

    btnAddSave.Visible = true;

    btnEditSave.Visible = false;

    lblTitle.Text = "新增";

    }

    else

    {

    btnAddSave.Visible = false;

    btnEditSave.Visible = true;

    lblTitle.Text = "編輯";

    txtStu_No.ReadOnly = true;

    txtStu_No.Enabled = false;

    fn_Show_Data();

    }

  • Anonymous
    5 years ago

    到下面的網址看看吧

    ▶▶http://*****

  • Anonymous
    5 years ago

    >這家不錯 lv333。cC買幾次啦真的一樣

    唸亏吺侍匽

Still have questions? Get your answers by asking now.