Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Remove trailing "=" when base64 encoding -


i noticing whenever base64 encode string, "=" appended @ end. can remove character , reliably decode later adding back, or dangerous? in other words, "=" always appended, or in cases?

i want encoded string short possible, that's why want know if can remove "=" character , add before decoding.

thanks

the = padding.

wikipedia says

an additional pad character allocated may used force encoded output integer multiple of 4 characters (or equivalently when unencoded binary text not multiple of 3 bytes) ; these padding characters must discarded when decoding still allow calculation of effective length of unencoded text, when input binary length not multiple of 3 bytes (the last non-pad character encoded last 6-bit block represents zero-padded on least significant bits, @ 2 pad characters may occur @ end of encoded stream).

if control other end, remove when in transport, re-insert (by checking string length) before decoding.
note data not valid base64 in transport.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -