|
我想在WebNavigator按下新增時,WebFormView有個label會直接帶入登入者的姓名? |
|
|
可在WebFormView的DataBound的事件中寫入,程式如下: protected void WebFormView1_DataBound(object sender, EventArgs e) { if (WebFormView1.CurrentMode == FormViewMode.Insert) { Label KeyinNameLabel = (Label)WebFormView1.FindControl("KeyinNameLabel");//KeyinNameLabel為該Label的ID KeyinNameLabel.Text = CliUtils.fUserName; } }
|
|
|