Rapid solution in Programming and Related Bug: Common Problems while Consuming Web Services over ...: To consume https enabled web service on test environment, a self-signed certificate (test certificate) is being used. Check this link on...
C#,C++, Java,php,vb.net find oops-solution,OOPs FAQs : Object Oriented Interview Questions and programming solution.sql server2000,2005,2008, issue related to SSRS,Jquery,javascript and postgreSQL.Articles on WEB services,WCF and windows services.
Search This Blog
Monday, September 12, 2011
Installing SSL on localhost/Setting up SSL with IIS6.0
Rapid solution in Programming and Related Bug: Installing SSL on localhost/Setting up SSL with a ...: This article will demonstrate how to install SelfSSL from the IIS Resource Kit. You can download the Internet Information Services (IIS)...
Wednesday, September 7, 2011
How to pass XML/Datatable/Dataset in Store Procedu...
Rapid solution in Programming and Related Bug: How to pass XML/Datatable/Dataset in Store Procedu...: Every time we face problem of passing multiple value in store procedure to perform the following task 1) Multiple insert in table 2)...
Wednesday, August 10, 2011
Rapid solution in Programming and Related Bug: How to use Merge T-SQL Command
Rapid solution in Programming and Related Bug: How to use Merge T-SQL Command: "The MERGE statement performs INSERT/UPDATE/DELETE operations on a target table based on the results of a join with a source table. In the s..."
Sunday, August 7, 2011
Preventing Re-submission of data on Browser Refresh
Avoid Duplicate record insert on page refresh using ASP.NET
Code
VB.net
Dim IsPageRefresh As Boolean = False
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
If ViewState("postid").ToString() = Session("postid").ToString() Then
IsPageRefresh = True
End If
Session("postid") = System.Guid.NewGuid().ToString()
ViewState("postid") = Session("postid")
Code
VB.net
Dim IsPageRefresh As Boolean = False
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
If ViewState("postid").ToString() = Session("postid").ToString() Then
IsPageRefresh = True
End If
Session("postid") = System.Guid.NewGuid().ToString()
ViewState("postid") = Session("postid")
End Sub
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
If Page.IsValid And IsPageRefresh Then
' Write your Code here
End Sub
C#
bool IsPageRefresh = false;
protected void Page_Load(object sender, System.EventArgs e)
{
if (Page.IsPostBack) {
if (ViewState("postid").ToString() == Session("postid").ToString()) {
IsPageRefresh = true;
}
}
Session("postid") = System.Guid.NewGuid().ToString();
ViewState("postid") = Session("postid");
}
protected void btnSubmit_Click(object sender, System.EventArgs e)
{
if (Page.IsValid & IsPageRefresh) {
// Write your Code here
}
}
Subscribe to:
Posts
(
Atom
)