<binding name="LargeBuffer" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
Tuesday, January 11, 2011
Sunday, January 9, 2011
Close using C# code
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Discount After Bill", "self.close();", true);
Script Manager Popup JavaScript
function popup(url, w, h)
{
var width = w;
var height = h;
var left = (screen.width - width) / 2;
var top = (screen.height - height) / 2;
var params = 'width=' + width + ', height=' + height; params += ', top=' + top + ', left=' + left;
params += ', directories=no'; params += ', location=no'; params += ', menubar=no'; params += ', resizable=yes'; params += ', scrollbars=yes'; params += ', status=no';
params += ', toolbar=no'; newwin = window.open(url, 'windowname5', params);
if (window.focus) {
newwin.focus()
} return false;
}
{
var width = w;
var height = h;
var left = (screen.width - width) / 2;
var top = (screen.height - height) / 2;
var params = 'width=' + width + ', height=' + height; params += ', top=' + top + ', left=' + left;
params += ', directories=no'; params += ', location=no'; params += ', menubar=no'; params += ', resizable=yes'; params += ', scrollbars=yes'; params += ', status=no';
params += ', toolbar=no'; newwin = window.open(url, 'windowname5', params);
if (window.focus) {
newwin.focus()
} return false;
}
Saturday, January 1, 2011
Gridview row deleting dynamically
protected void btnDelete_Click(object sender, EventArgs e)
{
DataTable DtList = null
System.Web.UI.WebControls.ImageButton imgbtn = (System.Web.UI.WebControls.ImageButton)sender
int id = int.Parse(imgbtn.CommandArgument) - 1;DtList = (DataTable)ViewState["DataTable"];DtList.Rows.RemoveAt(id );
DtList.AcceptChanges();gdvSearchResult.DataSource = DtList;
gdvSearchResult.DataBind();
ViewState["DataTable"] = DtList;
}
{
DataTable DtList = null
System.Web.UI.WebControls.ImageButton imgbtn = (System.Web.UI.WebControls.ImageButton)sender
int id = int.Parse(imgbtn.CommandArgument) - 1;DtList = (DataTable)ViewState["DataTable"];DtList.Rows.RemoveAt(id );
DtList.AcceptChanges();gdvSearchResult.DataSource = DtList;
gdvSearchResult.DataBind();
ViewState["DataTable"] = DtList;
}
Subscribe to:
Comments (Atom)