Hi
I Display Multiple data Muliple view bags from multiple store procedure and Display in html page what i want when i click submit this html page data with same design i want to base 64 formate and this data i need to send other api and get this data and display to user
Thulasiram pakalaPosted May 25, 2023, 11:25 AM
Persional Details,
Family details,
Income details like
model.Income ,model.Address ,model.Family like diffret model class i bind one html page when i click submit i need to submit this hole page data like pdf this data convert base 64 and need to send api in this how
Thulasiram pakalaPosted May 25, 2023, 9:22 AM
Multple view bags are having 20 viewbags data i display so all i need to display view page this data i need to convert pdf and this pdf convert ase 64 and need to sent how
Rajkiran SwainPosted May 25, 2023, 8:38 AM
Retrieve the HTML data from the HTML page or view bags in your controller action.
Convert the HTML data to a byte array using the appropriate encoding (e.g., UTF-8).
Convert the byte array to Base64 string using the
Convert.ToBase64Stringmethod.Send the Base64 string to the desired API using an HTTP request (e.g., using the
HttpClientclass).Here's an example of how you can achieve this: