Category : .net

I am using the crypto-js library to implement the HMACSHA1 for my javascript code the code looks like this const hash1 = require("crypto-js"); let signature = "application_id=3610&auth_key=aDRceQyTXSYEdJU&nonce=6304033672&timestamp=1623098533&user[login][email protected]&user[password]=123456789" let key = "dBV2PdhYMnruSMb" let hash = hash1.HmacSHA1(signature, key).toString() console.log(hash) //which prints 467280c4cb82fc97bd04c51d8a846446ad6e82e1 this obviously is pretty easy in javascript. But then I tried using the same exact ..

Read more

I have code block where I need to use a ‘@’ character to get an index of the Email Id to check it’s domain. I have put it on a same page of Asp.Net Mvc like below: function SubmitForm() { var allDomains = ‘@System.Configuration.ConfigurationManager.AppSettings["AllowedDomain"]’; var allowedDomains = alDomains.split(‘;’); var emailText = document.getElementById(‘Email’).value; if (emailText != ..

Read more

I have multiple input type=submit buttons which control MSchart display. I’d like to change button’s background color upon onclick and remains the same until other buttons are clicked. <asp:TableRow> <asp:TableCell CssClass="cellDocListData" HorizontalAlign="Right"> <input type="submit" id="btnAppsD" runat="server" cssclass="btnClientPollBox" font-size="10" onserverclick="bindchtTopD" />&nbsp; <asp:ImageButton ID="imgZoomD" runat="server" imageurl="Images/eye2.png" width="30" CssClass="imgCommandBorder" />&nbsp;&nbsp;&nbsp; </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell CssClass="cellDocListData" HorizontalAlign="Right"> <input type="submit" ..

Read more

I want to create QR Code from user data. I have using below library for creating QR Code. Install-Package QRCoder Now I have done below code to convert data into base64 string. private static Byte[] BitmapToBytes(Bitmap img) { using (MemoryStream stream = new MemoryStream()) { img.Save(stream, System.Drawing.Imaging.ImageFormat.Png); return stream.ToArray(); } } public JsonResult SaveVisitorEntry(string FirstName, ..

Read more

Below i’ve used hard coded multiple lat long var url = @"https://maps.googleapis.com/maps/api/distancematrix/xml?origins=24.74712999956982,46.5368152409792|24.5576972961426,46.8022346496582|24.9216365814209,46.7802574375|24.7977771759033,46.6214179992676|24.6342353820801,46.5405044555664|24.869083404541,46.6235580444336|24.796724319458,46.7717247009277&destinations=24.7471295792982,46.5368152409792|24.5576972961426,46.8022346496582|24.9216365814209,46.7802734375|24.7977771759033,46.6214179992676|24.6342353820801,46.5405044555664|24.869083404541,46.6235580444336|24.796724319458,46.7717247009277&departure_time=1621784369&callback=InitializeMap&libraries=places&v=weekly"; Source: Ask Javascript..

Read more