锘??xml version="1.0" encoding="utf-8" standalone="yes"?>91精品福利,国产精品美腿一区在线看,97电影在线观看http://www.aygfsteel.com/programmer/category/27875.htmlzh-cnFri, 07 Dec 2007 06:19:37 GMTFri, 07 Dec 2007 06:19:37 GMT60Add javascript to the clienthttp://www.aygfsteel.com/programmer/archive/2007/08/30/165566.htmlwadewadeThu, 30 Aug 2007 10:34:00 GMThttp://www.aygfsteel.com/programmer/archive/2007/08/30/165566.htmlhttp://www.aygfsteel.com/programmer/comments/165566.htmlhttp://www.aygfsteel.com/programmer/archive/2007/08/30/165566.html#Feedback0http://www.aygfsteel.com/programmer/comments/commentRss/165566.htmlhttp://www.aygfsteel.com/programmer/services/trackbacks/165566.html 

Show how to add script to the client in aspx file.

/// <param name="rbl">RadioButtonList to apply script to</param>
/// <param name="page">The Page the script is going to be appended to</param>
/// <param name="script">The script to append</param>
public static void SetRadioButtonListItemScript(RadioButtonList rbl, Page page, string script)
{
for (int idx = 0; idx < rbl.Items.Count; idx++)
{
RegisterClientObjectFunction(page, rbl, idx, script);
}
}

/// <param name="page">The Page the script is going to be appended to</param> /// <param name="rbl">RadioButtonList to apply script to</param> /// <param name="idx">the index of the radio button</param> /// <param name="script">The script to append</param> static private void RegisterClientObjectFunction(Page page, RadioButtonList rbl, int idx, string script)
{
StringBuilder sw = new StringBuilder();
if (!page.IsStartupScriptRegistered(rbl.ClientID + "_" + idx.ToString() + "script"))
{
sw.Append(@"<SCRIPT>");
sw.Append(@"document.getElementById('" + rbl.ClientID + "_" + idx.ToString() + "').onclick=function() {" + script + "return true;}");
sw.Append(@"</SCRIPT>");
page.RegisterStartupScript(rbl.ClientID + "_" + idx.ToString() + "script", sw.ToString());
}
}

static private void RegisterClientObjectFunction(Page page, CheckBox chk, string script)
{
StringBuilder sw = new StringBuilder();
if (!page.IsStartupScriptRegistered(chk + "script"))
{
sw.Append(@"<SCRIPT>");
sw.Append(@"document.getElementById('"+chk.ClientID + "').onclick=function() {" + script + "return true;}");
sw.Append(@"</SCRIPT>");
page.RegisterStartupScript(chk.ClientID + "script", sw.ToString());
}
}

 


wade 2007-08-30 18:34 鍙戣〃璇勮
]]>
Refresh related controls' value when data changed using DataBind in Winformhttp://www.aygfsteel.com/programmer/archive/2007/08/29/165569.htmlwadewadeWed, 29 Aug 2007 02:31:00 GMThttp://www.aygfsteel.com/programmer/archive/2007/08/29/165569.htmlhttp://www.aygfsteel.com/programmer/comments/165569.htmlhttp://www.aygfsteel.com/programmer/archive/2007/08/29/165569.html#Feedback0http://www.aygfsteel.com/programmer/comments/commentRss/165569.htmlhttp://www.aygfsteel.com/programmer/services/trackbacks/165569.htmlGoal:

Use a ComboBox to select an item, and save the selected item's value to some textboxes. each control is using databinding.

Problems:

1. set control's value when comboBox changed, after the comboBox lost focus, the text was lost since the controls reload the data from binding source.

2. set binding source's value, the text will be set only when the comboBox lost focus. but we want to set the text immediately when the comboBox changed.

Solution:

set binding source's value, and call comboBox's writeValue for comboBox. this will write the comboBox's value to datasource, and reload all controls' value.

Test selectedTest = (Test)comboBox1.SelectedItem;

Test test = (Test)bindingSource1.DataSource;
if (selectedTest == null || test == null)
return;

//save the selected value to the binding source test.Name = selectedTest.Name; test.Value = selectedTest.Value; //this will write the comboBox's value to datasource, and reload all controls' value comboBox1.DataBindings["SelectedValue"].WriteValue();

 


wade 2007-08-29 10:31 鍙戣〃璇勮
]]>
Use AbstractTransactionalSpringContextTests to rollback NUnit test case automaticallyhttp://www.aygfsteel.com/programmer/archive/2007/08/20/165575.htmlwadewadeMon, 20 Aug 2007 08:12:00 GMThttp://www.aygfsteel.com/programmer/archive/2007/08/20/165575.htmlhttp://www.aygfsteel.com/programmer/comments/165575.htmlhttp://www.aygfsteel.com/programmer/archive/2007/08/20/165575.html#Feedback0http://www.aygfsteel.com/programmer/comments/commentRss/165575.htmlhttp://www.aygfsteel.com/programmer/services/trackbacks/165575.html闃呰鍏ㄦ枃

Wade 2007-08-20 16:12 鍙戣〃璇勮


wade 2007-08-20 16:12 鍙戣〃璇勮
]]>
Parse and format date in c#http://www.aygfsteel.com/programmer/archive/2007/08/17/165576.htmlwadewadeFri, 17 Aug 2007 07:18:00 GMThttp://www.aygfsteel.com/programmer/archive/2007/08/17/165576.htmlhttp://www.aygfsteel.com/programmer/comments/165576.htmlhttp://www.aygfsteel.com/programmer/archive/2007/08/17/165576.html#Feedback0http://www.aygfsteel.com/programmer/comments/commentRss/165576.htmlhttp://www.aygfsteel.com/programmer/services/trackbacks/165576.html闃呰鍏ㄦ枃

Wade 2007-08-17 15:18 鍙戣〃璇勮


wade 2007-08-17 15:18 鍙戣〃璇勮
]]>
Could not load file or assembly 'ADODB, Version=7.0.3300.0http://www.aygfsteel.com/programmer/archive/2007/08/16/165577.htmlwadewadeThu, 16 Aug 2007 08:59:00 GMThttp://www.aygfsteel.com/programmer/archive/2007/08/16/165577.htmlhttp://www.aygfsteel.com/programmer/comments/165577.htmlhttp://www.aygfsteel.com/programmer/archive/2007/08/16/165577.html#Feedback0http://www.aygfsteel.com/programmer/comments/commentRss/165577.htmlhttp://www.aygfsteel.com/programmer/services/trackbacks/165577.html闃呰鍏ㄦ枃

Wade 2007-08-16 16:59 鍙戣〃璇勮


wade 2007-08-16 16:59 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 天门市| 江油市| 长沙市| 鸡泽县| 靖边县| 府谷县| 陵川县| 平远县| 淮滨县| 浑源县| 安丘市| 邢台县| 苏尼特右旗| 富宁县| 台南市| 股票| 昆山市| 延边| 玉门市| 青龙| 林芝县| 什邡市| 邵武市| 锦州市| 广河县| 洛南县| 新干县| 策勒县| 聊城市| 烟台市| 陇西县| 苏尼特左旗| 泾川县| 盖州市| 连城县| 钦州市| 吐鲁番市| 和平区| 英吉沙县| 元江| 大埔区|