[Dev] BackEnd/ASP.NET

DB에 저장된 데이터를 이용하여 Wizard Control 내에 위치한 DropDownList의 데이터를 Binding하는데 문제가 있었다. Step1의 있는 DDL의 데이터는 정상적으로 Binding을 하는데 Step2의 있는 녀석들은 --- Select --- 라는 Default 값만 내내 표시하고 있었다. XMLDataSource를 통해서 Item들을 가져오면서 어디선까 꼬인 것 같았다. - ASPX Select - CS ddlState.SelectedValue = dr["State"].ToString(); 뭐냐 너는..ㅡㅡ;;; 답은 간단했다.. - CS ddlState.DataBind(); ddlState.SelectedValue = dr["State"].ToString(); 아무래도 ddlSt..
This is another walkthrough, like my last post, demonstrating how to use some new Visual Studio 2010 features available in the October VS2010 CTP. It provides steps to follow in the CTP build; however, you may find that you are able to give feedback on the descriptions below without actually downloading and executing the steps yourself. Please leave your feedback on this feature set at the end o..
Column names If a column name contains any of these special characters ~ ( ) # \ / = >
SqlDataSource를 사용하지 않고 .cs에서 페이징으로 구성할때는 아래와 같이 PagePropertiesChanging 이벤트를 추가해줘야한다. protected void Listview_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { DataPager dp; dp = ((ListView)sender).FindControl("DataPager1") as DataPager; dp.SetPageProperties(e.StartRowIndex, e.MaximumRows, false); ListView.DataSource = GetDataSet(); ListView.DataBind(); } GetDataSet()은 사용..
-- Aspx // 네임스페이스 등록 -- CS using RashidPager; // 페이지당 행의 수 db.AddInParameter(dbCmd, "@PageSize", DbType.Int16, PagerSubmittedCase.RowPerPage); // 현재 페이지 Number db.AddInParameter(dbCmd, "@CurrentPage", DbType.Int16, PagerSubmittedCase.CurrentPageNo); // 총 데이터 수(return value) db.AddOutParameter(dbCmd, "@TotalCount", DbType.String, 5); // 총 데이터 수를 Pager 클래스의 TotalRow의 변수에 값을 배정한다 PagerSubmittedCase..
foreach (Control c in Page.Form.Controls) { switch (c.GetType().ToString()) { case ("System.Web.UI.WebControls.TextBox"): paramters.Add(c.ID, ((TextBox)c).Text.ToString()); break;
IE8에 의해서 간간히 발생하는 오류로써 처음에는 무슨 오류가 싶어서 하루 종일 소스만 보면서 파고 들었는데 결국 "..WebResource.axd?d=XXXXXXX" d 파라미터 뒤에 QueryString이 중간에 짤려있었다..ㅠㅠ 간단한 해결 방안은!!!!!!!!!!!!! head안에 정의 되어 있는 메타태그를 Page_Load 함수로 옮겨놓는 것이다.ㅋ Response.ContentType = "text/html"; Response.Charset = "utf-8"; 요렇게 말이다.!! 브라우저의 문제였단 말인가..ㅜㅜ 아..머리아포~~ 참고 사이트 http://blog.soft-cor.com/?tag=/scriptresource.axd http://alterprocedure.net/articles/..
[Page.GetPostBackEventReference()를 이용한 doPostBack] 자바스크립트로 behind code의 메서드를 실행하고 싶은 경우가 있다. 이럴 경우 보통은 스크립트에서 __doPostBack() 메서드를 정의해서 사용하곤 한다. 하지만, 이는 좋지 못한 방법이다. __doPostBack() 메서드는 .net에서 자동 생성하는 부분으로, 개발자가 별도로 작성하여도 바뀔 가능성이 있다. 또한, .net에서 자동으로 생성하지 않는 경우도 발생한다. 스크립트로 behind code의 메서드를 실행하고 싶을 때는 아래와 같은 방법을 권한다. 이는 postback이 발생하는 WebForm Control을 매개변수로 넘겨주면, 자동으로 __doPostBack()을 생성해 준다. ex) [..
JaeYa_Lee
'[Dev] BackEnd/ASP.NET' 카테고리의 글 목록 (2 Page)