Hi @HOUSSEM MAHJOUBI,
You can try the following methods:
<input type="hidden" value="" name="clientScreenWidth" id="clientScreenWidth" />
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<script src="Scripts/jquery-3.4.1.min.js"></script>
<script>
$(document).ready(function () {
$("#clientScreenWidth").val($(window).width());
});
</script>
Protected Sub Button1_Click(sender As Object, e As EventArgs)
Dim width As String = HttpContext.Current.Request.Params("clientScreenWidth")
If width IsNot Nothing Then
End If
End Sub
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.