im stuck with this code. i Dont have any idea why delete queries are not executing but update query does.

 if (IsPost && Request["block"] != null)
               var blockQuery="update Report set IsBlock='1' where Sender='"+Request["block"]+"' AND SendedFor='"+Request["block2"]+"'"; 
       var delfriend = "delete from FriendRequest where (SenderUserID='" +           Request["block"] + "' AND RequestedUserID='" + Request["block1"] + "') AND IsActive='1'";
       var delfriend1 = "delete from FriendRequest where (SenderUserID='" + Request["block1"] + "' AND RequestedUserID='" + Request["block"] + "') AND IsActive='1'";  
       Blockmessage = "User Blocked"; 

    @foreach (var row in db.Query(selectReportquery))
                 <form action="" method="post"> 
               <input type="hidden" name="block" value="@row.sender" />
               <input type="hidden" name="block2" value="@row.SendedFor" />
               <input type="submit" value="Block" class="button" />

Related posts

Recent Viewed