this is my jquery code:
<script type="text/javascript">
$(document).ready(function () {
$("a").hover(function () {
$.ajax({
type: "POST",
url:"Dbread.aspx",
data: "name=salam",
success: function (result) {
alert(result);
} //end of success
});
}, function () {
});
});
</script>
in Dbread.aspx
i wrote:
string str= Request.QueryString["name"];
Response.Write(str);
but the problem is that query string result is null all times!!!
what is problem?
You are using method “POST” and not providing actual query string. Query string is created only for “GET” method and should be the part of the URL, so the fix would be:
or