|
One Post is Enough.
Regards,
Satips.
|
|
|
|
|
Plz change your code here
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
<br />
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete();")<br />
instead of
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
If (Not Page.IsPostBack) Then<br />
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete();")<br />
End If
Coz when u click on button then javascript function will not fire.
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
It is very simple to do it.
Just do redirect on click of Button event.
function confirm_delete()
{
if (confirm("Are you sure you want to delete the custom search?"))
return true;
else
return false;
}
BEst regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Hi,
Implement the follwing solution.
Put hyperlink button on your page and create a click event handler for it as follwing.
<asp:LinkButton ID="lbtn" runat="server" Text="Click" OnClick="lbtn_Click"></asp:LinkButton>
protected void lbtn_Click(object sender, EventArgs e)
{
Response.Redirect(YourURL);
}
Write javascript function as follwing.
function confirmation()
{
return window.confirm("Are sure u want to redirect");
}
and in Page_Load write the following statement.
lbtn.Attributes.Add("onclick", "javascript:return confirmation();");
I am sure this will solve your problem.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi,
I need to create two trees in a web page.
And, users can drag one node of a tree to the nodes list of another.
Do you have any suggestion?
|
|
|
|
|
hi friends
i have registration page in that page i am having username ,password,Captcha image .
now enter the fields,if username is already exsits ,it will throw the error in label.now page is refreshing that captcha image is changing and password also disappear
now i want the password is didnot disappear and captcha image didnot change ,if username already exisits.
regards
saravanan
|
|
|
|
|
saravanan05 wrote: password also disappear
put the password in session object and assign text box with that session object value When page refreshes due to Error
saravanan05 wrote: page is refreshing that captcha image is changing
What is it ? Where are loading the image in page ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
put that password in string and after checking username availabilitty again pass the string value to textbox................
like string password=txtpassword.text;
//Check for username availablity
txtpassword.text=password;
|
|
|
|
|
DOn't reply me reply to user who posted the question
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hello friends
this is ajay rathi. i am facing a big problem in my asp.net 1.1 project....
i want to show image in datagrid and this image is store in MS SQL SERVER 2000 in binary form.so can anyone of yor help me for this problem..i m using C# as back coding...
please help me to solve this problem
my email id is ajayrathi2004@yahoo.com
i m waiting for your reply.....
|
|
|
|
|
Check this......
Hope this might be helpfull to u
http://www.codeproject.com/cs/database/ImageSaveInDataBase.asp
|
|
|
|
|
Hello Ajay
Write a function that can convert BLOB data to image as told in the article. Then call this function either from itemdatabound event or from page like <img src='<%# yourFunction(Param) %>'>
Happy programming
|
|
|
|
|
Please tell me the use and implementaion of Roles in asp.net 2.0
Sunil Nair
|
|
|
|
|
website menu / ASP.NET Configuration
and set the rolls for form , user etc.,
and it is added in config.file.
vijaya
|
|
|
|
|
good day everyone...
i need help regarding datatables..
how to use/ or insert records in datatables...
sample codes or link is highly appreciated...
thank you everyone in advance.....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
1. If you want to insert values from the stored procedure, then you will have to call that
procedure and fill the table using SQlDataAdapter
DataTable table = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter()
adapter.Fill(table);
Else here is a sample code for datatable. (If you really don't know anything about using datatables.
DataTable table = new DataTable();
DataColumn col1 = new DataColumn("select",Type.GetType("System.Boolean"));
DataColumn col2 = new DataColumn("Name", Type.GetType("System.String"));
table.Columns.Add(col1);
table.Columns.Add(col2);
DataRow r1 = table.NewRow();
r1["select"] = true;
r1["Name"] = "Something";
DataRow r2 = table.NewRow();
r2["select"] = false;
r2["Name"] = "nothing";
table.Rows.Add(r1);
table.Rows.Add(r2);
|
|
|
|
|
thank you sir....your help really helps me sir... thank you more than words could express....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Create a new datatable as
Datatable dt=new Datatable();
whatever columns u would like to insert add them.
if(dt.columns["a"]==null)
dt.columns.add(a);
if(dt.columns["b"]==null)
dt.columns.add(b);
if(dt.columns["c"]==null)
dt.columns.add(c);
DataRow dr = dt.NewRow();
dt.Rows.Add(dr);
dt.AcceptChanges();
nextadd the values into datatable as
dt.rows[0]["a"]=txtbox1.text;
dt.rows[0]["b"]=txtbox2.text;
dt.rows[0]["c"]=txtbox3.text;
|
|
|
|
|
thank you sir/mam, i didnt know how to express my thanks... this is my first time using datatable... and almost all you guys here in forum are really kind and helpful... highly appreciated... thank you very much
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Welcome moomoooomoo..............
Go ahead............
|
|
|
|
|
Hai friends,
I need some information about editable gridview, Please provide.
My question is
i am sending text into one field of database with comma(,) seperated.
I want to retrive that field into editable gridview with different rows each comma seperated word.
i need a editable gridview without showing edit button in asp.net.
Thanking You,
Harinath
|
|
|
|
|
|
Hai
Thanks for providing your suggesion
bye
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 119%;
}
.style2
{
width: 119%;
height: 16px;
}
.style14
{
width: 164px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<table border="0" width="100%" >
<tr>
<td width="100%" height="50">
<table height="50px" style="width: 100%">
</table>
</td>
</tr>
<tr>
<td>
<table bgcolor="#666666" width="100%">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Registrant Details"
ForeColor="White"></asp:Label>
</td>
</tr>
<tr>
<td bgcolor="White" height="20">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width=100% align="right" style="width: 210px">
<tr align="right" >
<td class="style1" width="100%" align="left">
<asp:Label ID="Label2" runat="server" Text="Registry no"></asp:Label>
</td>
</tr>
<tr align="right">
<td class="style1" align="left">
<asp:Label ID="lblRegNo" runat="server" Text="40013242424" Font-Size="Smaller"></asp:Label>
</td>
</tr>
<tr align="right">
<td class="style1" width="100%" align="left">
<asp:Label ID="Label4" runat="server" Text="Event Date"></asp:Label>
</td>
</tr>
<tr align="right">
<td class="style2" width="100%" align="left">
<asp:Label ID="Label5" runat="server" Text="08/13/2016" Font-Size="Smaller"></asp:Label>
</td>
</tr>
<tr align="right">
<td class="style1" width="100%" align="left">
<asp:Label ID="Label6" runat="server" Text="Pickup Store "></asp:Label>
</td>
</tr>
<tr align="right">
<td class="style2" width="100%" align="left">
<asp:Label ID="Label7" runat="server" Text="St. Albert Centre" Font-Size="Smaller"></asp:Label>
</td>
</tr>
<tr align="right">
<td class="style2" width="100%" align="left">
<asp:Label ID="Label8" runat="server" Text="(000)000-0000" Font-Size="Smaller"></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
<%--for grid--%>
<tr>
<td align="center">
<asp:GridView ID="grdOrders" runat="server" AutoGenerateColumns="false"
Width="1112px" HeaderStyle-BackColor=#CCCCCC ShowFooter="true"
AllowPaging="true" PageSize="5" onrowdatabound="GridView1_RowDataBound" >
<Columns>
<asp:BoundField HeaderText="Qty" DataField="Quantity" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10" />
<asp:TemplateField HeaderText="Qty Req'd" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="20" >
<ItemTemplate>
<asp:Label ID="lblQtyRecvd" runat="server" Text='<%#Eval("QuantityRecieved") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Qty Rec'd" DataField="QuantityRequired" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="20"/>
<asp:BoundField HeaderText="Description" DataField="SkuName" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="50" />
<asp:TemplateField HeaderText="Price" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="20" >
<ItemTemplate>
<asp:Label ID="lblDollar" runat="server" Text="$" />
<asp:Label ID="lblPrice" runat="server" Text='<%# (Eval("UnitPrice","{0 ,0.00}")) %>' />
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="lbltxtTotal" runat="server" Text="Sub Total" Font-Bold="True" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Amount" HeaderStyle-Width="15" ItemStyle-HorizontalAlign="center">
<ItemTemplate >
<asp:Label ID="lblDollar1" runat="server" Text="$" />
<asp:Label ID="lblTotal" runat="server" Text='<%#String.Format("{0:n2}", Convert.ToDouble(Eval("UnitPrice")) * Convert.ToInt64(Eval("Quantity")))%>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
<FooterStyle HorizontalAlign="Right" />
<FooterTemplate>
<asp:Label ID="lblDollar1" runat="server" Text="$" Font-Bold="True" />
<asp:Label ID="lbltxtTotalPrice" runat="server" Font-Bold="True" />
</FooterTemplate>
</asp:TemplateField>
<%-- <asp:BoundField HeaderText="Price" DataField="price" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="20" FooterText="Total Price:"/>
<asp:BoundField HeaderText="total" DataField="total" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="50" }" />--%>
</Columns>
</asp:GridView>
</td>
</tr>
<%-- <asp:BoundField HeaderText="Price" DataField="price" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="20" FooterText="Total Price:"/>
<asp:BoundField HeaderText="total" DataField="total" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="50" }" />--%> <%--for grid--%><%--last--%>
<tr>
<td width="100%" height="20">
<table height="20px" border="1" align="center" width="1112px">
<tr align="right">
<td align=center class="style14">
<asp:Button ID="btnEmptybag" runat="server" Text="Empty Bag" Height="23px"
Width="95px" />
</td>
<td align="left"
style="font-family: Arial, Helvetica, sans-serif; font-size: small">
when applicable,special promotions and other discounts will be applied to the price(s) when your credit card is charged
</td>
</tr>
</table>
</td>
</tr>
<%-- table ag--%>
<tr>
<td width="100%" height="20">
<table height="50px" border="0" align="center" width="1112px">
<tr align="left">
<td align="left"
style="font-family: Arial, Helvetica, sans-serif; font-size: small">
</td>
<td align=center class="style14">
<asp:Button ID="btnShopping" runat="server" Text="<< Continue Shopping" Height="23px"
Width="145px" />
</td>
</tr>
</table>
</td>
</tr>
<%-- for continue to shopping--%>
</table>
</form>
</body>
</html>
-- modified 19-Sep-13 10:29am.
|
|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="assignment._Default" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
var TotalChkBx;
var Counter;
window.onload = function () {
TotalChkBx = parseInt('<%= this.grdEmployees.Rows.Count %>');
Counter = 0;
}
function HeaderClick(CheckBox) {
var TargetBaseControl =
document.getElementById('<%= this.grdEmployees.ClientID %>');
var TargetChildControl = "chkBxSelect";
var Inputs = TargetBaseControl.getElementsByTagName("input");
for (var n = 0; n < Inputs.length; ++n)
if (Inputs[n].type == 'checkbox' &&
Inputs[n].id.indexOf(TargetChildControl, 0) >= 0)
Inputs[n].checked = CheckBox.checked;
//Reset Counter
Counter = CheckBox.checked ? TotalChkBx : 0;
}
function ChildClick(CheckBox, HCheckBox) {
//get target control.
var HeaderCheckBox = document.getElementById(HCheckBox);
//Modifiy Counter;
if (CheckBox.checked && Counter < TotalChkBx)
Counter++;
else if (Counter > 0)
Counter--;
//Change state of the header CheckBox.
if (Counter < TotalChkBx)
HeaderCheckBox.checked = false;
else if (Counter == TotalChkBx)
HeaderCheckBox.checked = true;
}
function isDelete() {
return confirm("Do you want to delete this row ?");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<%--for grid--%>
<%-- <asp:boundfield headertext="Price" datafield="price" itemstyle-horizontalalign="Center" headerstyle-width="20" footertext="Total Price:">
<asp:boundfield headertext="total" datafield="total" itemstyle-horizontalalign="left" headerstyle-width="50" }"="">--%><%-- <asp:boundfield headertext="Price" datafield="price" itemstyle-horizontalalign="Center" headerstyle-width="20" footertext="Total Price:">
<asp:boundfield headertext="total" datafield="total" itemstyle-horizontalalign="left" headerstyle-width="50" }"="">--%><%-- <asp:boundfield headertext="Price" datafield="price" itemstyle-horizontalalign="Center" headerstyle-width="20" footertext="Total Price:">
<asp:boundfield headertext="total" datafield="total" itemstyle-horizontalalign="left" headerstyle-width="50" }"="">--%>
<%--for grid--%>
<%--last--%>
<asp:gridview id="grdEmployees" runat="server" autogeneratecolumns="false" width="1112px"
="" headerstyle-backcolor="#CCCCCC" showfooter="true" allowpaging="true" pagesize="5" onrowcommand="grdEmployees_RowCommand" onselectedindexchanged="grdEmployees_SelectedIndexChanged" onrowdatabound="grdEmployees_RowDataBound" onrowdeleting="grdEmployees_RowDeleting">
<columns>
<asp:templatefield headertext="Select">
<itemtemplate>
<asp:checkbox id="chkBxSelect" runat="server">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
<itemstyle horizontalalign="Center" verticalalign="Middle" width="50px">
<HeaderTemplate>
<asp:checkbox id="chkBxHeader" onclick="javascript:HeaderClick(this);" runat="server">
</HeaderTemplate>
<asp:templatefield headertext="Employee Id" itemstyle-horizontalalign="Center" headerstyle-width="40">
<itemtemplate>
<asp:label id="lblEmpId" runat="server" text="<%#Eval("EmpId") %>">
<HeaderStyle Width="40px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<asp:templatefield headertext="Name" itemstyle-horizontalalign="Center" headerstyle-width="40">
<itemtemplate>
<asp:label id="lblEmpName" runat="server" text="<%#Eval("EmpName") %>">
<HeaderStyle Width="40px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<asp:boundfield headertext="Account" datafield="Account" itemstyle-horizontalalign="Center"
="" headerstyle-width="20">
<HeaderStyle Width="20px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<asp:boundfield headertext="Email" datafield="email" itemstyle-horizontalalign="Center"
="" headerstyle-width="20">
<HeaderStyle Width="20px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<asp:templatefield headertext="Contact No" itemstyle-horizontalalign="Center" headerstyle-width="50">
<itemtemplate>
<asp:textbox id="txtContactNo" runat="server" text="<%#Eval("ContactNo") %>">
<HeaderStyle Width="50px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<asp:templatefield headertext="Experience" itemstyle-horizontalalign="Center" headerstyle-width="10">
<itemtemplate>
<asp:textbox id="txtExp" runat="server" text="<%#Eval("Experience") %>">
<HeaderStyle Width="10px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<asp:templatefield headertext="Skill" itemstyle-horizontalalign="Center" headerstyle-width="20">
<itemtemplate>
<asp:textbox id="txtSkill" runat="server" text="<%#Eval("Skill") %>">
<HeaderStyle Width="20px"></HeaderStyle>
<itemstyle horizontalalign="Center">
<%-- Adding button to gridview --%>
<asp:templatefield headertext="Delete">
<itemtemplate>
<asp:button id="BtnDelete" commandname="dele" runat="server" text="Delete" commandargument="<%# Eval("EmpId") %>" oonclientclick="isDelete()"
="" onclick="BtnDelete_Click">
<%-- <asp:boundfield headertext="Price" datafield="price" itemstyle-horizontalalign="Center" headerstyle-width="20" footertext="Total Price:">
<asp:boundfield headertext="total" datafield="total" itemstyle-horizontalalign="left" headerstyle-width="50" }"="">--%>
<HeaderStyle BackColor="#CC99FF"></HeaderStyle>
|
|
<asp:button id="btnUpdate" runat="server" onclick="btnUpdate_Click" text="Update">
<asp:label id="Label1" runat="server" text="Label">
|
|
|
</form>
</body>
</html>
|
|
|
|