title: Returned Rowversion data from a POST is not valid base64
body: <p>I am sending Rowversion data to my view in order to test for Concurrency issue for Update/Delete of a record to SQL Server. The Rowversion data in the record is Byte[] which has to be converted to a Base64 string so it can be serialized. This is being done by a getter in my ViewModel. The returned Base64 data is being converted back to Byte[] by a setter. (I believe this is standard practice when dealing with SQL Server rowversion data.)</p>
  
  <p>My ViewModel is...</p>
  
  <pre><code>    public byte[] RowVersionId { get; set; }
      public string RowVersionIdBase64
      {
          get
          {
              if (this.RowVersionId != null)
              {
                  return Convert.ToBase64String(this.RowVersionId);
              }
              return string.Empty;
          }
          set
          {
              if (string.IsNullOrEmpty(value))
              {
                  this.RowVersionId = null;
              }
              else
              {
                  this.RowVersionId = Convert.FromBase64String(value);
              }
  
          }
      }
  </code></pre>
  
  <p>The Post causes error "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters." </p>
  
  <p>The Post Parameters as displayed by Firebug are...(just relevant data shown here - sorry but SO mangles the layout somewhat)</p>
  
  <p>...
  RowVersionIdBase64<br>
  AAAAAAAAF3E=
  RowVersionId[]<br>
  0
  RowVersionId[]<br>
  0
  RowVersionId[]<br>
  0
  RowVersionId[]<br>
  0
  RowVersionId[]<br>
  0
  RowVersionId[]<br>
  0
  RowVersionId[]<br>
  23
  RowVersionId[]<br>
  113
  ...</p>
  
  <p>The Post Source is...(full post data shown here)</p>
  
  <p>PropertyId=1&amp;RateFromDate=Sat+Apr+15+2017+00%3A00%3A00+GMT%2B1000+(AUS+Eastern+Standard+Time)&amp;RateToDate
  =Sat+Apr+15+2017+00%3A00%3A00+GMT%2B1000+(AUS+Eastern+Standard+Time)&amp;RateName=fff&amp;RateComment=&amp;MinimumStay
  =1&amp;WeekRate=0&amp;WeekendRate=&amp;WeekEndNightRate=150&amp;MidweekNightRate=100&amp;MonthRate=0&amp;FullPeriodRate=0&amp;Cancelled
  =false&amp;DateCreated=Thu+Apr+14+2016+07%3A57%3A16+GMT%2B1000+(AUS+Eastern+Standard+Time)&amp;DateCancelled
  =&amp;RowVersionId%5B%5D=0&amp;RowVersionId%5B%5D=0&amp;RowVersionId%5B%5D=0&amp;RowVersionId%5B%5D=0&amp;RowVersionId%5B
  %5D=0&amp;RowVersionId%5B%5D=0&amp;RowVersionId%5B%5D=23&amp;RowVersionId%5B%5D=113&amp;RowVersionIdBase64=AAAAAAAAF3E%3D&amp;Id=7</p>
  
  <p>What is wrong with it and how can I fix it?</p>
  
  <p>Thank you.</p>