posted by 네코냥이 2015. 5. 9. 11:44


HTML input태그에서 엔터시 강제로 이동되는 현상.pdf




출처: https://gs.saro.me/

posted by 네코냥이 2015. 4. 17. 12:05

Passing Values Using HttpContext

At times, we use Server.Transfer to redirect the user from one page to another page. In this case, one cannot use querystring because the Server.Transfer will redirect to the target page using the same request in the server i.e. there will not be any roundtrip to the client before redirecting and hence the context of the request in the target page is same as the request in source page.

 

In this scenario, we can use the HttpContext object to pass values from source page to destination page. The HttpContext object exposes an Item collection which will accept name-value pairs. This Item collection can be used to attach a value in source page and retrieve it back from the destination page.


※ Transfer 사용시 ,  HttpContext 간의 Item Collection 교환이 이뤄지므로,

이곳에 담아 보내면 좋다. 


Usage

Source.aspx

protected void btnRedirect_Click(object sender, EventArgs e)

    {

        HttpContext _context = HttpContext.Current;

        _context.Items.Add("val", "from previouspage");

       Server.Transfer("Destination.aspx");

    }

Destination.aspx

 protected void Page_Load(object sender, EventArgs e)

    {

        HttpContext _context = HttpContext.Current;

        Response.Write(_context.Items["val"]);

     }

posted by 네코냥이 2015. 1. 8. 11:39


Posting across pages.pdf


1. 이전페이지 등록

2. 

<asp:Button runat="server" PostBackUrl="~/xxxx/yyyy.aspx" ID="btnCross"

                    CssClass="hc" />

posted by 네코냥이 2014. 11. 6. 12:04

Do I need to SubmitChanges after executing a stored procedure with Linq-To-Sql?


답변1


No you don't. The code will work. Submit changes is only concerned with modified LINQ to SQL objects and not stored procs.


답변2


If you update records via stored proc, your loaded (and tracked) objects may become stale. If you call SubmitChanges with stale objects, you'll get concurrency exceptions. You can refresh a stale object using the Refresh method on DataContext.

posted by 네코냥이 2014. 10. 4. 12:36



 

 Controller

ApiController 

데이터 제공 

뷰 제공 

Y


또 라우팅을 다루는 클래스와 파일조차 구분되어있다.


Difference between ApiController and Controller in ASP.pdf


posted by 네코냥이 2014. 6. 19. 17:06


OnInit called but Page_Load not called on Postback _ The Official Forums for Microsoft ASP.pdf


왜 나는 안불르고 얘만 불러?

posted by 네코냥이 2014. 5. 13. 09:37


How to Start and Stop Only One Particular Application Under Website Root Node.pdf


'.NET > .NET' 카테고리의 다른 글

[MVC] ApiController와 Controller의 차이점  (293) 2014.10.04
[ASP.NET] UpdatePanel 의 변덕  (332) 2014.06.19
ASP.NET 생명주기 - 자료2  (149) 2014.03.19
[ASP.NET 2.0] 페이지 캐싱  (148) 2014.02.10
[ASP.NET] 캐싱 개념  (145) 2014.02.09
posted by 네코냥이 2014. 3. 19. 10:50



'.NET > .NET' 카테고리의 다른 글

[ASP.NET] UpdatePanel 의 변덕  (332) 2014.06.19
.NET 어플리케이션(웹) 일부만 중단시키기  (286) 2014.05.13
[ASP.NET 2.0] 페이지 캐싱  (148) 2014.02.10
[ASP.NET] 캐싱 개념  (145) 2014.02.09
[.NET] OnCommand  (0) 2014.02.02
posted by 네코냥이 2014. 2. 10. 19:30

<%@ OutputCache Duration="#ofseconds"
   Location="Any | Client | Downstream | Server | None | 
     ServerAndClient "
   Shared="True | False"
   VaryByControl="controlname"
   VaryByCustom="browser | customstring"
   VaryByHeader="headers"
   VaryByParam="parametername" 
   CacheProfile="cache profile name | ''"
   NoStore="true | false"
   SqlDependency="database/table name pair | CommandNotification"
%>

Wrox Article _ Using the ASP.NET 2.pdf




'.NET > .NET' 카테고리의 다른 글

.NET 어플리케이션(웹) 일부만 중단시키기  (286) 2014.05.13
ASP.NET 생명주기 - 자료2  (149) 2014.03.19
[ASP.NET] 캐싱 개념  (145) 2014.02.09
[.NET] OnCommand  (0) 2014.02.02
.NET 페이지 리퀘스트 이벤트, 업데이트 패널시 사용.  (0) 2014.01.24
posted by 네코냥이 2014. 2. 9. 07:30


1. 캐싱(Caching) ?

  : 이미 처리된 데이터를  캐시에 넣는 행위를 말한다.

 

    (1) 캐싱기능

       ㄱ. 출력캐싱 - 페이지 처리 결과를 출력 캐시에 저장하고 사용자가 페이지를 다시 요청할때

                           페이지를 다시 처리하는 대신 출력 캐시에 저장된 결과를 다시 사용하는 캐싱기법

           - 출력캐싱기법 

              a. 전체페이지 캐싱 - 페이지 전체를 캐싱하는 기법 

                        <%@ OutputCache Duration="10" VaryByParam="none"&>

                         => .aspx 페이지를 10초간 출력 캐시에 저장하며, 매개변수를 통한 출력캐시는

                              사용하지 않겠다

                   @ OutputCache :  Duration, VaryByParam 특성을 지정해 줘야 한다.

 

              b. 부분페이지 캐싱 - 페이지의 일부분을 캐싱하는 기법

            

         ㄴ. 데이터 캐싱 - 사용자가 생성한 데이터 자체를 저장하는 캐싱기법

                               - 응용 프로그램 캐싱이라고도 한다.

 

    (2) 캐싱이 일어나는 순서

      1. .asp페이지를 최초로 요청하면 파서에 의해 .asp 페이지 구분을 분석하는 파싱 작업이

           일어난다.            

      2. 중간언어(IL)로 만드는 컴파일 작업이 일어난다.

      3. 생성된 중간언어는 어셈블리 캐시에 저장되고  메모리가 올려진 중간언어는 CLR에 의해

          실행된후 그 결과가 사용자에게 웹 페이지 형식으로 렌더링된다.

 

2. 캐시

  : 문맥상 명사(저장소) 또는 동사(저장하다)의 형태로 사용될수 있으므로 상황에 따라 캐싱과 동일한

    의미를 가진다.

  : 빠른 데이터 처리를 위해 이미 처리된 데이터를 임시적으로 저장해 두는 장소를 말한다.