Skip to main content

Posts

Showing posts with the label ASP NET MVC Online Practice Test

Convert varbinary to string C#

How to convert varbinary to string c#? // convert varbinary to string c# public byte[] binaryData { get ; set ; } // FOR ASCII Encoding string ascii = System.Text.Encoding.ASCII. GetString (binaryData); OR // FOR UTF8 Encoding string utf = System.Text.Encoding.UTF8. GetString (binaryData); OR // FOR Unicode Encoding string unicode = System.Text.Encoding.Unicode. GetString (binaryData); OR // CONVERT BYTE ARRAY TO HEXA string AsString = SecurityManager. ByteToHexBitFiddle (binaryData); // CONVERT BYTE ARRAY TO HEXA public static string ByteToHexString (byte[] bytes) { char[] c = new char[bytes.Length * 2 ]; int b; for ( int i = 0 ; i < bytes.Length; i ++ ) { b = bytes[i] > > 4 ; c[i * 2 ] = (char)( 55 + b + (((b -10 ) > > 31 ) & -7 )); b = bytes[i] & 0xF ; c[i * 2 + 1 ] = (char)( 55 + b + (((b -10 ) > > 31 ) & -7 )); } return new string (...

ASP NET MVC Online Practice Test

Online Practice Test Which one is the best approach to assign a session value in Asp.Net MVC? System.Web.HttpContext.Current.Session["ID"] =2; Current.Session["ID"] =2; Session["ID"] =2; None All of above. Which one way to render Partial View using ASP.Net MVC Razor Engine? @Html.Partial("_PartialHeader") @Html.PartialView("_PartialHeader") @Html.PartialHtml("_PartialHeader") Both A) & B) None Is ViewBag slower than ViewData in MVC? Yes No Both A) & B) None All What is AuthConfig.cs in ASP.Net MVC ? AuthConfig.cs is used to configure route settings AuthConfig.cs is used to configure security settings including sites oAuth Login. Both A) & B) All None What is RouteConfig.cs in ASP.Net MVC? RouteConfig.cs is used to register MVC config statements, route config. RouteConfig.css is used to register global MVC bundles. Both A) & B) All None What is the benefit...