When returning a string from a stored procedure as a return parameter, we must set it to a non-null value before the stored proc is called – even if it’s an output-only parameter. So we’ll need to make your parameter have a direction of InputOutput and set a default value: <asp:Parameter Name=”MyReturnParameter” Type=”String” Direction=”InputOutput” DefaultValue=”A […]
Tag: webform
How to add Output Parameter to SqlDataSource
<asp:Parameter Name=”NewID” Direction=”Output” Type=”Int32″ DefaultValue=”0″ /> Here is a more detailed example in use: <asp:sqlDataSource ID=”EmployeeDetailsSqlDataSource” SelectCommand=”SELECT EmployeeID, LastName, FirstName FROM Employees WHERE EmployeeID = @EmpID” InsertCommand=”INSERT INTO Employees(LastName, FirstName) VALUES (@LastName, @FirstName); SELECT @EmpID = SCOPE_IDENTITY()” UpdateCommand=”UPDATE Employees SET LastName=@LastName, FirstName=@FirstName WHERE EmployeeID=@EmployeeID” DeleteCommand=”DELETE Employees WHERE EmployeeID=@EmployeeID” ConnectionString=”<%$ ConnectionStrings:NorthwindConnection %>” OnInserted=”EmployeeDetailsSqlDataSource_OnInserted” RunAt=”server”> <SelectParameters> <asp:Parameter […]
How to get the integrity value for a jquery version of script reference in a web page
You can use https://www.srihash.org/ to generate links. https://code.jquery.com/jquery-3.6.0.min.js will be generated as <script src=”https://code.jquery.com/jquery-3.6.0.min.js” integrity=”sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==” crossorigin=”anonymous”></script> You can get all the versions of jquery from here: https://releases.jquery.com/jquery/ Thanks to mscdeveloper for such great post.
How to get session value in Javascript
<script> let mySession = ‘<%= Session[“SessionName”].ToString() %>’; //use your session … console.log(mySession); alert(mySession); </script>