Page.IsValid always false inside User Control

1.Page.IsValid always false inside User Control
http://forums.asp.net/t/1407610.aspx/1

Cách của chú này cũng được:

I created a public property, IsValid and used it to return IsValid from all of the requiredfieldvalidators in my user control:

public bool IsValid 
        { 
                get 
                { 
                        return rqdNlFirstName.IsValid && 
                                   rqdNlLastName.IsValid && 
                                   rqdNlStreet.IsValid && 
                                   rqdNlCity.IsValid && 
                                   rqdNlState.IsValid && 
                                   rqdNlZip.IsValid && 
                                   rqdNlBusinessPhone.IsValid && 
                                   rqdNlEmail.IsValid; 
                } 
   

        } 
 This implementation worked for me.  Thanks! 

2. Page.IsValid always return false
http://stackoverflow.com/questions/3500656/page-isvalid-always-return-false

3. ASP.NET Whidbey Tip and Trick: Validation Groups
http://weblogs.asp.net/scottgu/archive/2004/10/24/246945.aspx

 

Session timeout too fast in asp.net

1.Session expiring too fast!
http://forums.asp.net/t/1460908.aspx/2/10
2.Session Timeouts Causes and Remedies
http://www.c-sharpcorner.com/uploadfile/technoNet/session-timeouts-causes-and-remedies/
3. ASP.NET Session State
http://msdn.microsoft.com/en-us/library/ms972429.aspx

Một comment thấy cũng hay:

If you are storing it in InProc then I will suggest you to move it into another worker process.

I will suggest you to change your code like this in web.config file.

<sessionState
mode=”StateServer
cookieless=”false”
timeout=”200″/>

Here the session state is moved to a seperate worker process (ASP state management server).

Note: You need to start the ‘ASP.NET State Service’ windows service to make this code work.

I feel that this will solve your problem

Juice UI config

<juiceUI>
<amplify path=”~/Scripts/jquery/plugins/amplify/amplify.min.js”
debugPath=”~/Scripts/jquery/plugins/amplify/amplify.js” />
<jquery path=”~/Scripts/jquery/jquery-1.7.1.min.js”
debugPath=”~/Scripts/jquery/jquery-1.7.1.js”
cdnPath=”http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&#8221;
cdnDebugPath=”http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js&#8221;
cdnSupportsSecureConnection=”true” />
<jqueryuiScript
path=”~/Scripts/jquery/plugins/ui/jquery-ui-1.8.18.min.js”
debugPath=”~/Scripts/jquery/plugins/ui/jquery-ui-1.8.18.js”
cdnPath=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js&#8221;
cdnDebugPath=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.js&#8221;
cdnSupportsSecureConnection=”true” />

<juice path=”~/Scripts/jquery/plugins/juice/juice.min.js”
debugPath=”~/Scripts/jquery/plugins/juice/juice.js” />

<jqueryuiCss path=”~/Scripts/jquery/themes/redmond/minified/jquery.ui.all.min.css”
debugPath=”~/Scripts/jquery/themes/redmond/jquery-ui.css”
cdnPath=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css&#8221;
cdnDebugPath=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css&#8221; />

</juiceUI>

jquery + scan form change

1. Khi sửa 1 form bất kì, mình muốn kiểm tra là form có sự thay đổi nào không thì mới cho nút cập nhật enable lên (để đỡ mất công update khi không thay đổi gì), search 1 lúc thì thấy có 2 bài báo viết về nó

a.  jquery form change
http://stackoverflow.com/questions/3025396/jquery-form-change

b. Using JQuery ‘data’ feature to detect form changes
http://www.mydogboris.com/2009/10/using-jquery-data-feature-to-detect-form-changes/

asp.net ValidateRequest = false không làm việc với asp.net 4.0

1. Với mục đích loại bỏ XSS, để remove các thẻ html, javascript đi, mình set

<system.web>
    <pages validateRequest="false">
    </pages>
</system.web>
-> Nhưng nó vẫn không chạy, trong khi làm việc với asp.net 2.0 thì ngon.
Sau khi google 1 một lúc thì tìm ra cái này, chạy thấy ngon, chia sẻ bà con dùng t
<system.web>
  <httpRuntime requestValidationMode="2.0" />
  ...
  <pages ... validateRequest="false" />
</system.web>