|
Hi,
I am developing a C#.net application which shows a report of a retail store, the database contains some lacks records, i wrote a query which retrives data to display in the report. It is taking more than 5 mins to execute the query in SQL Server. When i run this query in my application it is giving "time out" error, In sql server I am getting the records, where as in my .net application it is giving the error.
Please help me in this matter.
Thanks & Regards,
O. NARENDRA BABU.
|
|
|
|
|
you can change the timeout by CommandTimeOut property.
SqlCommand cmd=new SqlCommand();
cmd.CommandTimeOut=yourtime;
Take a Look[^]
Or even you can try to optimize the SQL Query that it can give output as early as possible. 5 min is too much
cheers,
Abhijit
|
|
|
|
|
I Am developing a mail server for intranet . I want to create user ID on My mail server.How i can create it . when i pop the mails which i send by smtp . i have to use usename & Password to get it from the server. so i have to create user id on server so i can provide it.
if i use data base for user profile or details or user id which password i will have to provide to server for get the mails.
|
|
|
|
|
Hi,
Iam trying to overwrite the sitemap nodes by adding for example ?ID=1 to the URL when the user click one of the menu links in the master page depending on the following article:
http://msdn.microsoft.com/en-us/library/ms178425.aspx[^]
I put the code in the master page because it has the navigation menu and it receives the querystring from a page in another mater page.
I made some debugging already and found that the resolve event handler private method code is not hit?!
Could any one help to solve this problem.
I am too late but i will never give up
|
|
|
|
|
You must write code in destination page,not a master page.
studing is processing in this life.
|
|
|
|
|
But this mean for me writing in 40 forms or in a page class so they inherit from.But I tried this already and it didn't work I mean the ID is forgotten when navigate from page to another.
I am too late but i will never give up
|
|
|
|
|
The argument ID should post to destination page from master page.As for detail with this argument,using class is just a good method in 40 forms.
studing is processing in this life.
|
|
|
|
|
I'm saving the ListItemCollections of some controls in the session for later reuse when the user returns to the same page.
That works fine.
But when I set the webserver to use a stateserver instead of saving the session inprocess the application complains that the ListItemCollection is not Serializable.
It's also sealed/noninheritable.
What options do I have other than copying the settings of the ListItemCollection to and from an array? (Which is Serializable).
|
|
|
|
|
|
zoomin good video effect and asp.net,sql server tutorial
http://www.evdenevenakliyatbul.com/evden_eve_Nakliyat_firmalari_sozluk.asp?Hizmet=blend_silverlight_sql_server_asp.net_mysql_php_adobe_flash_photoshop_dreamweaver_dersleri&DuyuruID=7[^]
Than you canım
Bir kahve molası
http://www.evturnakliyat.com
http://www.cansizoglunakliyat.com
|
|
|
|
|
Hi All,
In our web Application,Session is TimeOut Very Quickly.Is there a way to increase the TimeOut period?
Is there a any solution for that?
Please help me to solve this.
Thanks in advance...
|
|
|
|
|
You can specify the session timeout there in the web.config file.
Apurva Kaushal
|
|
|
|
|
Yes. This is generally setting of web.config file
<sessionState mode="InProc" timeout="5"/>
Here time out is for 5 min you can chage it as per your requirment. you can also change it on SessionStart Event of Global.asax file as
Session.TimeOut=5;
cheers,
Abhijit
|
|
|
|
|
i have asp page with dropdownlist with username and datatable with same cloumn
when page get load first time , i want dropdownlist selectedvalue as datatables column value
means in dropdown_itembound event wht i hv to write
dropdowunlist1.selectedvalue=??what??
note:datatable values get change accoring updations
how i will assign value to dropdownlist??
|
|
|
|
|
bind dropdownlist with datasource, it will display automaticaly.
|
|
|
|
|
Load data on a dataset from database and bind it with Dropdown list as
if(!page.IsPostBack ) // Only when page is load
DropDownlist1.DataSource=datasourcename ;
cheers,
Abhijit
|
|
|
|
|
no iwant to add perticular value of username
i have no of rows....with diff username
gridview colums r....username,company name,date n upadate link for each row
when user can update date n username from dropdown list
n save the chanes
eg.defaultusername is arti n he will update tht to hema n
when nxt time tht page get load in dropdown list select value must be hema not arti
|
|
|
|
|
Hi
I have a task of changing the url of page suppose i get www.myweb.com/page1.aspx. I want to display it in a format like www.myweb.com/pakistan/university/DeanAddress.mp3. The page1 works on the basis of query string to display the related data. Pakistan is the country,University means the name of University and deanAddress.mp3 is used to show here DeanAddress mp3 can be found.
Is it possible to use the same page Page1 and display different urls. Or I have to create folder for each country,the folder for each University. This seems too lengthy. Someone told me HttpHandler can handle this but i failed to search any help.
Looking forward for your reply.
Thank you.
|
|
|
|
|
I have found a solution it works well
http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/
|
|
|
|
|
Hi
I am new to asp.net. I have a problem with gridview.selectedvalue. In my form
there are two grid. one is master another is detail. (forget formview whichone is using for insert new master record). Now when first time i am selecting record from master, Detail gridview showing correct record but afterwords gridviewsalesm.selectedvalue giving previous value. here is code. (forget my designing bcz i m new for web developement)
<br />
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Sales.aspx.cs" Inherits="Sales" %><br />
<br />
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %><br />
<br />
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server"><br />
<link href="StyleSheet.css" rel="stylesheet" type="text/css" /><br />
<asp:ScriptManager ID="ScriptManager1" runat="server"><br />
</asp:ScriptManager><br />
<br />
<table id="tablemain" class="salespage"><br />
<br />
<tr ><br />
<td >SALES TRANSACTION<asp:Label ID="LabelBrcd" runat="server" Text="Y" Visible="False"></asp:Label><br />
</td><br />
</tr><br />
<tr><br />
<td style="height: 22px"><br />
<br />
<asp:Panel ID="PanelBillHeader" runat="server" Height="231px"><br />
<asp:FormView ID="fvBillHeader" runat="server" DataKeyNames="BOOK,VRNO" <br />
DataSourceID="odssalesm" Width="842px" BorderStyle="Ridge" <br />
BorderWidth="2px" Caption="Bill Detail" CaptionAlign="Top" ><br />
<EditItemTemplate><br />
BOOK:<br />
<asp:Label ID="BOOKLabel1" runat="server" Text='<%# Eval("BOOK") %>' /><br />
<br /><br />
VRNO:<br />
<asp:Label ID="VRNOLabel1" runat="server" Text='<%# Eval("VRNO") %>' /><br />
<br /><br />
VRDATE:<br />
<asp:TextBox ID="VRDATETextBox" runat="server" Text='<%# Bind("VRDATE") %>' /><br />
<br /><br />
TYPE:<br />
<asp:TextBox ID="TYPETextBox" runat="server" Text='<%# Bind("TYPE") %>' /><br />
<br /><br />
ACCODE:<br />
<asp:TextBox ID="ACCODETextBox" runat="server" Text='<%# Bind("ACCODE") %>' /><br />
<br /><br />
ACNAME:<br />
<asp:TextBox ID="ACNAMETextBox" runat="server" Text='<%# Bind("ACNAME") %>' /><br />
<br /><br />
PH_HOME:<br />
<asp:TextBox ID="PH_HOMETextBox" runat="server" Text='<%# Bind("PH_HOME") %>' /><br />
<br /><br />
GROSSAMT:<br />
<asp:TextBox ID="GROSSAMTTextBox" runat="server" <br />
Text='<%# Bind("GROSSAMT") %>' /><br />
<br /><br />
NETAMOUNT:<br />
<asp:TextBox ID="NETAMOUNTTextBox" runat="server" <br />
Text='<%# Bind("NETAMOUNT") %>' /><br />
<br /><br />
GIVENAMT:<br />
<asp:TextBox ID="GIVENAMTTextBox" runat="server" <br />
Text='<%# Bind("GIVENAMT") %>' /><br />
<br /><br />
CHANGEAMT:<br />
<asp:TextBox ID="CHANGEAMTTextBox" runat="server" <br />
Text='<%# Bind("CHANGEAMT") %>' /><br />
<br /><br />
CASHAMT:<br />
<asp:TextBox ID="CASHAMTTextBox" runat="server" Text='<%# Bind("CASHAMT") %>' /><br />
<br /><br />
CARDAMT:<br />
<asp:TextBox ID="CARDAMTTextBox" runat="server" Text='<%# Bind("CARDAMT") %>' /><br />
<br /><br />
CHQNO:<br />
<asp:TextBox ID="CHQNOTextBox" runat="server" Text='<%# Bind("CHQNO") %>' /><br />
<br /><br />
CHQDT:<br />
<asp:TextBox ID="CHQDTTextBox" runat="server" Text='<%# Bind("CHQDT") %>' /><br />
<br /><br />
CHQBANK:<br />
<asp:TextBox ID="CHQBANKTextBox" runat="server" Text='<%# Bind("CHQBANK") %>' /><br />
<br /><br />
CHQAMT:<br />
<asp:TextBox ID="CHQAMTTextBox" runat="server" Text='<%# Bind("CHQAMT") %>' /><br />
<br /><br />
CURR:<br />
<asp:TextBox ID="CURRTextBox" runat="server" Text='<%# Bind("CURR") %>' /><br />
<br /><br />
CURRRATE:<br />
<asp:TextBox ID="CURRRATETextBox" runat="server" <br />
Text='<%# Bind("CURRRATE") %>' /><br />
<br /><br />
FOREIGNCURR:<br />
<asp:TextBox ID="FOREIGNCURRTextBox" runat="server" <br />
Text='<%# Bind("FOREIGNCURR") %>' /><br />
<br /><br />
SLMNCD:<br />
<asp:TextBox ID="SLMNCDTextBox" runat="server" Text='<%# Bind("SLMNCD") %>' /><br />
<br /><br />
SHIFT:<br />
<asp:TextBox ID="SHIFTTextBox" runat="server" Text='<%# Bind("SHIFT") %>' /><br />
<br /><br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" <br />
CommandName="Update" Text="Update" /><br />
<asp:LinkButton ID="UpdateCancelButton" runat="server" <br />
CausesValidation="False" CommandName="Cancel" Text="Cancel" /><br />
</EditItemTemplate><br />
<InsertItemTemplate><br />
Invoice No : <br />
<asp:TextBox ID="VRNOTextBox" runat="server" Text='<%# Bind("VRNO") %>' <br />
Height="22px" Width="102px" /><br />
<asp:RequiredFieldValidator ID="rfvVrNo" runat="server" <br />
ControlToValidate="VRNOTextBox" EnableViewState="False" <br />
ErrorMessage="Enter Invoice No" SetFocusOnError="True">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="rfvVrNo_ValidatorCalloutExtender" <br />
runat="server" Enabled="True" TargetControlID="rfvVrNo"><br />
</cc1:ValidatorCalloutExtender><br />
<br />
Date : <br />
<asp:TextBox ID="TextBoxInvDate" runat="server" Text='<%# Bind("VRDATE") %>' <br />
Width="88px"></asp:TextBox><br />
<cc1:CalendarExtender ID="reqInvDateCE" runat="server" <br />
Enabled="True" Format="dd/MM/yyyy" TargetControlID="TextBoxInvDate"><br />
</cc1:CalendarExtender><br />
<asp:RequiredFieldValidator ID="reqInvDate" runat="server" <br />
ControlToValidate="TextBoxInvDate" <br />
ErrorMessage="You should enter Invoice Date ">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="reqInvDateE" runat="server" Enabled="True" <br />
TargetControlID="reqInvDate"><br />
</cc1:ValidatorCalloutExtender><br />
<br /><br />
Party Detail Contact No : <br />
<asp:TextBox ID="PH_HOMETextBox" runat="server" Text='<%# Bind("PH_HOME") %>' /><br />
Name : <br />
<asp:TextBox ID="ACNAMETextBox" runat="server" Text='<%# Bind("ACNAME") %>' <br />
Width="342px" /><br />
<br /><br />
Shift : <br />
<asp:RequiredFieldValidator ID="reqShift" <br />
runat="server" ControlToValidate="rblShift" <br />
ErrorMessage="You should select Shift">*</asp:RequiredFieldValidator><br />
<asp:RadioButtonList ID="rblShift" runat="server" <br />
RepeatDirection="Horizontal" SelectedValue='<%# Bind("SHIFT") %>'><br />
<asp:ListItem Value="1">I</asp:ListItem><br />
<asp:ListItem Value="2">II</asp:ListItem><br />
<asp:ListItem Value="3">III</asp:ListItem><br />
</asp:RadioButtonList><br />
<cc1:ValidatorCalloutExtender ID="ReqShiftE" runat="server" Enabled="True" <br />
TargetControlID="reqShift"><br />
</cc1:ValidatorCalloutExtender><br />
<br /><br />
Salesman : <br />
<asp:DropDownList ID="ddlSalman" runat="server" DataSourceID="odsMstEmpl" <br />
DataTextField="EmpNm" DataValueField="Empcd" Font-Size="X-Small" Height="16px" <br />
SelectedValue='<%# Bind("SLMNCD") %>' Width="300px"><br />
</asp:DropDownList><br />
<br /><br />
Net Amount : <br />
<asp:TextBox ID="NETAMOUNTTextBox" runat="server" <br />
Text='<%# Bind("NETAMOUNT") %>' Width="72px" Enabled="False" /><br />
<br /><br />
Cash Paid : <br />
<asp:TextBox ID="CASHAMTTextBox" runat="server" Text='<%# Bind("CASHAMT") %>' <br />
Width="72px" Enabled="False" /><br />
<br />
Card Payment :<br />
<asp:TextBox ID="CARDAMTTextBox" runat="server" Text='<%# Bind("CARDAMT") %>' <br />
Enabled="False" /><br />
<br /><br />
Cheque No : <br />
<asp:TextBox ID="CHQNOTextBox" runat="server" Text='<%# Bind("CHQNO") %>' <br />
Width="72px" Enabled="False" /><br />
<br />
Cheque Date :<br />
<asp:TextBox ID="CHQDTTextBox" runat="server" Text='<%# Bind("CHQDT") %>' <br />
Enabled="False" /><br />
<br /><br />
Cheuqe Amount : <br />
<asp:TextBox ID="CHQAMTTextBox" runat="server" Text='<%# Bind("CHQAMT") %>' /><br />
<br />
<br /><br />
Cheque Bank : <br />
<asp:TextBox ID="CHQBANKTextBox" runat="server" Text='<%# Bind("CHQBANK") %>' /><br />
<br /><br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" <br />
CommandName="Insert" Text="Insert" /><br />
<asp:LinkButton ID="InsertCancelButton" runat="server" <br />
CausesValidation="False" CommandName="Cancel" Text="Cancel" /><br />
</InsertItemTemplate><br />
<ItemTemplate><br />
Invoice No : <br />
<asp:Label ID="VRNOLabel" runat="server" Text='<%# Eval("VRNO") %>' /><br />
Date : <br />
<asp:Label ID="VRDATELabel" runat="server" Text='<%# Bind("VRDATE") %>' /><br />
<br /><br />
Party Detail Contact No : <br />
<asp:Label ID="PH_HOMELabel" runat="server" Text='<%# Bind("PH_HOME") %>' /><br />
<asp:Label ID="ACNAMELabel" runat="server" Text='<%# Bind("ACNAME") %>' /><br />
<br /><br />
Net Amount : <br />
<asp:Label ID="NETAMOUNTLabel" runat="server" Text='<%# Bind("NETAMOUNT") %>' /><br />
<br /><br />
Cash Amount : <br />
<asp:Label ID="CASHAMTLabel" runat="server" Text='<%# Bind("CASHAMT") %>' /><br />
Card Amount : <br />
<asp:Label ID="CARDAMTLabel" runat="server" Text='<%# Bind("CARDAMT") %>' /><br />
<br /><br />
Cheque No : <br />
<asp:Label ID="CHQNOLabel" runat="server" Text='<%# Bind("CHQNO") %>' /><br />
Date : <br />
<asp:Label ID="CHQDTLabel" runat="server" Text='<%# Bind("CHQDT") %>' /><br />
<br />
<br /><br />
Cheque Amount : <br />
<asp:Label ID="CHQAMTLabel" runat="server" Text='<%# Bind("CHQAMT") %>' /><br />
<br /><br />
Cheque Bank : <br />
<asp:Label ID="CHQBANKLabel" runat="server" Text='<%# Bind("CHQBANK") %>' /><br />
<br /><br />
Salesman : <br />
<asp:Label ID="SLMNCDLabel" runat="server" Text='<%# Bind("SLMNCD") %>' /><br />
<br /><br />
Shift : <br />
<asp:Label ID="SHIFTLabel" runat="server" Text='<%# Bind("SHIFT") %>' /><br />
<br /><br />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" <br />
CommandName="New" Text="New" /><br />
</ItemTemplate><br />
</asp:FormView><br />
</asp:Panel><br />
</td><br />
</tr><br />
<br />
<tr><br />
<td style="height: 22px"><br />
<asp:ObjectDataSource ID="odsMstEmpl" runat="server" <br />
OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataMstEmpl" <br />
TypeName="mstemplBLL"><br />
<SelectParameters><br />
<asp:ControlParameter ControlID="LabelBrcd" Name="brcd" PropertyName="Text" <br />
Type="String" /><br />
</SelectParameters><br />
</asp:ObjectDataSource><br />
<asp:Panel ID="Panel1" runat="server" Width="100%" ><br />
<asp:ObjectDataSource ID="odssalesm" runat="server" DeleteMethod="DeleteItem" <br />
OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByBranch" <br />
TypeName="salesmBLL" UpdateMethod="UpdateItem" <br />
onselecting="odssalesm_Selecting" onselected="odssalesm_Selected" <br />
InsertMethod="InsertSalesm" oninserting="odssalesm_Inserting"><br />
<DeleteParameters><br />
<asp:Parameter Name="original_book" Type="String" /><br />
<asp:Parameter Name="original_vrno" Type="String" /><br />
</DeleteParameters><br />
<UpdateParameters><br />
<asp:Parameter Name="book" Type="String" /><br />
<asp:Parameter Name="vrno" Type="String" /><br />
<asp:Parameter Name="vrdate" Type="DateTime" /><br />
<asp:Parameter Name="type" Type="String" /><br />
<asp:Parameter Name="accode" Type="String" /><br />
<asp:Parameter Name="acname" Type="String" /><br />
<asp:Parameter Name="ph_home" Type="String" /><br />
<asp:Parameter Name="grossamt" Type="Decimal" /><br />
<asp:Parameter Name="netamount" Type="Decimal" /><br />
<asp:Parameter Name="givenamt" Type="Decimal" /><br />
<asp:Parameter Name="changeamt" Type="Decimal" /><br />
<asp:Parameter Name="cashamt" Type="Decimal" /><br />
<asp:Parameter Name="cardamt" Type="Decimal" /><br />
<asp:Parameter Name="chqno" Type="String" /><br />
<asp:Parameter Name="chqdt" Type="DateTime" /><br />
<asp:Parameter Name="chqbank" Type="String" /><br />
<asp:Parameter Name="chqamt" Type="Decimal" /><br />
<asp:Parameter Name="curr" Type="String" /><br />
<asp:Parameter Name="currate" Type="Decimal" /><br />
<asp:Parameter Name="foreighcurr" Type="Decimal" /><br />
<asp:Parameter Name="shift" Type="Int16" /><br />
<asp:Parameter Name="slmncd" Type="String" /><br />
<asp:Parameter Name="original_book" Type="String" /><br />
<asp:Parameter Name="original_vrno" Type="String" /><br />
</UpdateParameters><br />
<SelectParameters><br />
<asp:ControlParameter ControlID="LabelBrcd" Name="book" PropertyName="Text" <br />
Type="String" /><br />
</SelectParameters><br />
<InsertParameters><br />
<asp:Parameter Name="book" Type="String" /><br />
<asp:Parameter Name="vrno" Type="String" /><br />
<asp:Parameter Name="vrdate" Type="DateTime" /><br />
<asp:Parameter Name="type" Type="String" /><br />
<asp:Parameter Name="accode" Type="String" /><br />
<asp:Parameter Name="acname" Type="String" /><br />
<asp:Parameter Name="ph_home" Type="String" /><br />
<asp:Parameter Name="grossamt" Type="Decimal" /><br />
<asp:Parameter Name="netamount" Type="Decimal" /><br />
<asp:Parameter Name="givenamt" Type="Decimal" /><br />
<asp:Parameter Name="changeamt" Type="Decimal" /><br />
<asp:Parameter Name="cashamt" Type="Decimal" /><br />
<asp:Parameter Name="cardamt" Type="Decimal" /><br />
<asp:Parameter Name="chqno" Type="String" /><br />
<asp:Parameter Name="chqdt" Type="String" /><br />
<asp:Parameter Name="chqbank" Type="String" /><br />
<asp:Parameter Name="chqamt" Type="Decimal" /><br />
<asp:Parameter Name="curr" Type="String" /><br />
<asp:Parameter Name="currate" Type="Decimal" /><br />
<asp:Parameter Name="foreighcurr" Type="Decimal" /><br />
<asp:Parameter Name="shift" Type="Int16" /><br />
<asp:Parameter Name="slmncd" Type="String" /><br />
</InsertParameters><br />
</asp:ObjectDataSource><br />
<asp:GridView ID="GridViewSalesm" runat="server" DataSourceID="odssalesm" <br />
AllowPaging="True" AutoGenerateColumns="False" <br />
DataKeyNames="book,vrno" PageSize="5" <br />
BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" <br />
CellPadding="4" EnableViewState="True"> <br />
<br />
<RowStyle BackColor="White" ForeColor="#330099" /><br />
<Columns><br />
<asp:CommandField ShowSelectButton="True" /><br />
<asp:BoundField DataField="book" HeaderText="book" ReadOnly="True" <br />
SortExpression="book" Visible="False" /><br />
<asp:BoundField DataField="vrno" HeaderText="Invoice No" ReadOnly="True" <br />
SortExpression="vrno" /><br />
<asp:BoundField DataField="vrdate" HeaderText="Date" SortExpression="vrdate" /><br />
<asp:BoundField DataField="type" HeaderText="Type" SortExpression="type" /><br />
<asp:BoundField DataField="accode" HeaderText="accode" SortExpression="accode" <br />
Visible="False" /><br />
<asp:BoundField DataField="acname" HeaderText="Party" SortExpression="acname" /><br />
<asp:BoundField DataField="ph_home" HeaderText="Contact No" <br />
SortExpression="ph_home" /><br />
<asp:BoundField DataField="grossamt" HeaderText="grossamt" <br />
SortExpression="grossamt" Visible="False" /><br />
<asp:BoundField DataField="netamount" HeaderText="NetAmount" <br />
SortExpression="netamount" /><br />
<asp:BoundField DataField="givenamt" HeaderText="givenamt" <br />
SortExpression="givenamt" Visible="False" /><br />
<asp:BoundField DataField="changeamt" HeaderText="changeamt" <br />
SortExpression="changeamt" Visible="False" /><br />
<asp:BoundField DataField="cashamt" HeaderText="cashamt" <br />
SortExpression="cashamt" Visible="False" /><br />
<asp:BoundField DataField="cardamt" HeaderText="cardamt" <br />
SortExpression="cardamt" Visible="False" /><br />
<asp:BoundField DataField="chqno" HeaderText="chqno" SortExpression="chqno" <br />
Visible="False" /><br />
<asp:BoundField DataField="chqdt" HeaderText="chqdt" SortExpression="chqdt" <br />
Visible="False" /><br />
<asp:BoundField DataField="chqbank" HeaderText="chqbank" <br />
SortExpression="chqbank" Visible="False" /><br />
<asp:BoundField DataField="chqamt" HeaderText="chqamt" SortExpression="chqamt" <br />
Visible="False" /><br />
<asp:BoundField DataField="curr" HeaderText="Curr" SortExpression="curr" <br />
Visible="False" /><br />
<asp:BoundField DataField="currrate" HeaderText="CurrRate" <br />
SortExpression="currrate" Visible="False" /><br />
<asp:BoundField DataField="foreigncurr" HeaderText="ForeignCurr" <br />
SortExpression="foreigncurr" Visible="False" /><br />
<asp:BoundField DataField="shift" HeaderText="Shift" SortExpression="shift" /><br />
<asp:BoundField DataField="slmncd" HeaderText="Salesman" <br />
SortExpression="slmncd" /><br />
</Columns><br />
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" /><br />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" /><br />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" /><br />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" /><br />
</asp:GridView><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
</asp:Panel><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<asp:Panel ID="PanelSalesItem" runat="server" EnableViewState="False" <br />
HorizontalAlign="Left" ><br />
<asp:ObjectDataSource ID="odsSalesd" runat="server" DeleteMethod="DeleteItem" <br />
InsertMethod="AddItem" OldValuesParameterFormatString="original_{0}" <br />
SelectMethod="GetDataByVrno" TypeName="salesdBLL" <br />
UpdateMethod="UpdateItem" <br />
ondeleted="odsSalesd_Deleted" <br />
oninserting="odsSalesd_Inserting" onupdated="odsSalesd_Updated" <br />
onselecting="odsSalesd_Selecting" ><br />
<DeleteParameters><br />
<asp:Parameter Name="original_book" Type="String" /><br />
<asp:Parameter Name="original_vrno" Type="String" /><br />
<asp:Parameter Name="original_srno" Type="Int16" /><br />
</DeleteParameters><br />
<UpdateParameters><br />
<asp:Parameter Name="book" Type="String" /><br />
<asp:Parameter Name="vrno" Type="String" /><br />
<asp:Parameter Name="srno" Type="Int16" /><br />
<asp:Parameter Name="itemcode" Type="String" /><br />
<asp:Parameter Name="qty" Type="Int16" /><br />
<asp:Parameter Name="gold" Type="Decimal" /><br />
<asp:Parameter Name="rate" Type="Decimal" /><br />
<asp:Parameter Name="amount" Type="Decimal" /><br />
<asp:Parameter Name="original_book" Type="String" /><br />
<asp:Parameter Name="original_vrno" Type="String" /><br />
<asp:Parameter Name="original_srno" Type="Int16" /><br />
<asp:Parameter Name="original_itemcode" Type="String" /><br />
<asp:Parameter Name="original_qty" Type="Int16" /><br />
<asp:Parameter Name="original_gold" Type="Decimal" /><br />
<asp:Parameter Name="original_rate" Type="Decimal" /><br />
<asp:Parameter Name="original_amount" Type="Decimal" /><br />
</UpdateParameters><br />
<SelectParameters><br />
<asp:Parameter Name="book" Type="String" /><br />
<asp:Parameter Name="vrno" Type="String" /><br />
</SelectParameters><br />
<InsertParameters><br />
<asp:Parameter Name="book" Type="String" /><br />
<asp:Parameter Name="vrno" Type="String" /><br />
<asp:Parameter Name="srno" Type="Int16" /><br />
<asp:Parameter Name="itemcode" Type="String" /><br />
<asp:Parameter Name="qty" Type="Int16" /><br />
<asp:Parameter Name="gold" Type="Decimal" /><br />
<asp:Parameter Name="rate" Type="Decimal" /><br />
<asp:Parameter Name="amount" Type="Decimal" /><br />
</InsertParameters><br />
</asp:ObjectDataSource><br />
<asp:UpdatePanel ID="UpdatePanelSalesItem" runat="server"><br />
<ContentTemplate><br />
<asp:GridView ID="gridSalesItem" runat="server" AllowPaging="True" <br />
AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" <br />
BorderStyle="None" BorderWidth="1px" <br />
Caption="<table border="1" width="100%" cellpadding="0" cellspacing="0" bgcolor= "#DEB887"><tr><td><h4>Item Detail</h4></td></tr></table>" <br />
CaptionAlign="Top" CellPadding="1" DataKeyNames="Book,Vrno,Srno" <br />
DataSourceID="odsSalesd" Font-Size="Small" <br />
onrowcommand="gridSalesItem_RowCommand" <br />
PageSize="5" ShowFooter="True" Width="100%" <br />
onrowcreated="gridSalesItem_RowCreated"><br />
<RowStyle BackColor="#E7E7FF" Font-Italic="False" ForeColor="#4A3C8C" /><br />
<Columns><br />
<asp:TemplateField ShowHeader="False"><br />
<EditItemTemplate><br />
<asp:Button ID="buttonUpdate" runat="server" CausesValidation="True" <br />
CommandName="Update" Text="Update" Width="60px" /><br />
<asp:Button ID="buttonCancel" runat="server" CausesValidation="False" <br />
CommandName="Cancel" Text="Cancel" Width="60px" /><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Button ID="buttonEdit" runat="server" CausesValidation="False" <br />
CommandName="Edit" Text="Edit" Width="60px" /><br />
<asp:Button ID="buttonDelete" runat="server" CausesValidation="False" <br />
CommandName="Delete" Text="Delete" Width="60px" /><br />
</ItemTemplate><br />
<ItemStyle Wrap="false" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Book" SortExpression="Book" Visible="False"><br />
<EditItemTemplate><br />
<asp:Label ID="Label2" runat="server" Text='<%# Eval("Book") %>'></asp:Label><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label7" runat="server" Text='<%# Bind("Book") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Vrno" SortExpression="Vrno" Visible="False"><br />
<EditItemTemplate><br />
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Vrno") %>'></asp:Label><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label8" runat="server" Text='<%# Bind("Vrno") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Srno" SortExpression="Srno"><br />
<EditItemTemplate><br />
<asp:Label ID="Label16" runat="server" Text='<%# Eval("Srno") %>'></asp:Label><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label17" runat="server" Text='<%# Bind("Srno") %>'></asp:Label><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Right" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Itemcode" SortExpression="Itemcode"><br />
<EditItemTemplate><br />
<asp:TextBox ID="EditItemcode" runat="server" Text='<%# Bind("Itemcode") %>'></asp:TextBox><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ><br />
<ContentTemplate><br />
<asp:TextBox ID="NewItemcode" runat="server" AutoPostBack="true" <br />
ontextchanged="NewItemcode_TextChanged" Width="80px"></asp:TextBox><br />
<asp:RequiredFieldValidator ID="rfvItemcode" runat="server" <br />
ControlToValidate="NewItemcode" ErrorMessage="Itemcode required">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="rfvItemcodeE" runat="server" Enabled="True" <br />
TargetControlID="rfvItemcode"><br />
</cc1:ValidatorCalloutExtender><br />
</ContentTemplate><br />
</asp:UpdatePanel><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label18" runat="server" Text='<%# Bind("Itemcode") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Article" SortExpression="Article"><br />
<EditItemTemplate><br />
<asp:Label ID="Label5" runat="server" Text='<%# Eval("Article") %>'></asp:Label><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:Label ID="NewArticle" runat="server" Text='<%# Bind("Article") %>'></asp:Label><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label10" runat="server" Text='<%# Bind("Article") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Qty" SortExpression="Qty"><br />
<EditItemTemplate><br />
<asp:TextBox ID="editQty" runat="server" Height="22px" <br />
Text='<%# Bind("Qty") %>' Width="62px"></asp:TextBox><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:TextBox ID="NewQty" runat="server" Width="60px"></asp:TextBox><br />
<asp:RequiredFieldValidator ID="rfvNewQty" runat="server" <br />
ControlToValidate="NewQty" ErrorMessage="Qty required">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="rfvNewQtyE" runat="server" Enabled="True" <br />
TargetControlID="rfvNewQty"><br />
</cc1:ValidatorCalloutExtender><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label19" runat="server" Text='<%# Bind("Qty") %>'></asp:Label><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Right" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Gold" SortExpression="Gold"><br />
<EditItemTemplate><br />
<asp:TextBox ID="editGold" runat="server" Text='<%# Bind("Gold") %>'></asp:TextBox><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:TextBox ID="NewGold" runat="server" Width="60px"></asp:TextBox><br />
<asp:RequiredFieldValidator ID="rfvNewGold" runat="server" <br />
ControlToValidate="NewGold" ErrorMessage="Gold Weight required">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="rfvNewGoldE" runat="server" Enabled="True" <br />
TargetControlID="rfvNewGold"><br />
</cc1:ValidatorCalloutExtender><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label4" runat="server" Text='<%# Bind("Gold") %>'></asp:Label><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Right" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Rate" SortExpression="Rate"><br />
<EditItemTemplate><br />
<asp:TextBox ID="editRate" runat="server" Text='<%# Bind("Rate") %>'></asp:TextBox><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:TextBox ID="NewRate" runat="server" Width="70px"></asp:TextBox><br />
<asp:RequiredFieldValidator ID="rfvNewRate" runat="server" <br />
ControlToValidate="NewRate" ErrorMessage="Rate required">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="rfvNewRateE" runat="server" Enabled="True" <br />
TargetControlID="rfvNewRate"><br />
</cc1:ValidatorCalloutExtender><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label20" runat="server" Text='<%# Bind("Rate") %>'></asp:Label><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Right" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Amount" SortExpression="Amount"><br />
<EditItemTemplate><br />
<asp:TextBox ID="editAmount" runat="server" Text='<%# Bind("Amount") %>'></asp:TextBox><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:TextBox ID="NewAmount" runat="server" Width="80px"></asp:TextBox><br />
<asp:RequiredFieldValidator ID="rfvNewAmt" runat="server" <br />
ControlToValidate="NewAmount" ErrorMessage="Amount required">*</asp:RequiredFieldValidator><br />
<cc1:ValidatorCalloutExtender ID="rfvNewAmtE" runat="server" Enabled="True" <br />
TargetControlID="rfvNewAmt"><br />
</cc1:ValidatorCalloutExtender><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label6" runat="server" Text='<%# Bind("Amount") %>'></asp:Label><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Right" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="RateCode" SortExpression="ratecode"><br />
<EditItemTemplate><br />
<asp:Label ID="Label21" runat="server" Text='<%# Eval("ratecode") %>'></asp:Label><br />
</EditItemTemplate><br />
<FooterTemplate><br />
<asp:Label ID="lblNewRateCode" runat="server" Text='<%# Eval("ratecode") %>'></asp:Label><br />
</FooterTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label9" runat="server" Text='<%# Eval("ratecode") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="FixRate" SortExpression="isfixrate"><br />
<FooterTemplate><br />
<asp:CheckBox ID="cbxIsFixRate" runat="server" <br />
Checked='<%# Bind("isfixrate") %>' Enabled="false" /><br />
</FooterTemplate><br />
<FooterStyle HorizontalAlign="Center" /><br />
<ItemTemplate><br />
<asp:CheckBox ID="CheckBox1" runat="server" <br />
Checked='<%# DataBinder.Eval(Container.DataItem, "isfixrate").ToString() == "1" %>' <br />
Enabled="false" /><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Center" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="RatePerPcs" SortExpression="israteperpcs"><br />
<FooterTemplate><br />
<asp:CheckBox ID="cbxIsratePerPcs" runat="server" <br />
Checked='<%# Bind("israteperpcs") %>' Enabled="false" /><br />
</FooterTemplate><br />
<FooterStyle HorizontalAlign="Center" /><br />
<ItemTemplate><br />
<asp:CheckBox ID="CheckBox2" runat="server" <br />
Checked='<%# DataBinder.Eval(Container.DataItem,"israteperpcs").ToString() =="1" %>' <br />
Enabled="false" /><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Center" /><br />
</asp:TemplateField><br />
<asp:TemplateField><br />
<FooterTemplate><br />
<asp:Button ID="btnAddItem" runat="server" CommandName="Insert" Text="Add" <br />
Width="60px" /><br />
</FooterTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="LooseSale" SortExpression="loosesale"><br />
<FooterTemplate><br />
<asp:CheckBox ID="cbxLooseSale" runat="server" <br />
Checked='<%# Bind("loosesale") %>' Enabled="false" /><br />
</FooterTemplate><br />
<FooterStyle HorizontalAlign="Center" /><br />
<ItemTemplate><br />
<asp:CheckBox ID="cbxLooseSale1" runat="server" <br />
Checked='<%# DataBinder.Eval(Container.DataItem,"loosesale").ToString() =="1" %>' <br />
Enabled="false" /><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Center" /><br />
</asp:TemplateField><br />
<br />
</Columns><br />
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" Wrap="False" /><br />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" /><br />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" /><br />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" /><br />
<EditRowStyle Wrap="False" /><br />
<AlternatingRowStyle BackColor="#F7F7F7" /><br />
</asp:GridView><br />
</ContentTemplate><br />
</asp:UpdatePanel><br />
<br />
<asp:ObjectDataSource ID="odsItemMaster" runat="server" <br />
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" <br />
TypeName="itemmasterBLL"><br />
</asp:ObjectDataSource><br />
</asp:Panel><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
</td><br />
</tr><br />
</table><br />
</script><br />
|
|
|
|
|
|
Hi:
I have the following requirement
there is a AreaofInterest SQL Table that contains InterestId(PrimaryKey),AreaOfInterest fields.
1)i have some check boxes in gridview in which the Area of interests field Like
*Reading books,*Playeig cricket has been bounded
2)Now the user can select the Multiple check boxes and click the Insert botton.
3)once the insert button is clicked the corresponding InterestId for Areaofinterests which is choosen by user has to be inserted into the table.
Important condition is InterestId should should not be bounded with any controls on grid Meaning that we should not use Hidden fieldcontrol .
How to insert the correspoding Id in to table.Can any one send me code or suggestion to solve this issue.
Thnaks
suresh.s
|
|
|
|
|
|
Hi guys currntly i am uploading my files and some other textbox values into my database...,
same thing i like to using datagrid/gridview...,
Means i want file control in gridview/datagrid...,
How to do that..., and one more thing date control also have to be...,
For date control i am using javascript
Guide me or giveme some reference plz
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
you have to Gridview TemplateControl for Adding File Control in Grid View
<asp:GridView ID="GridView1" runat="server">
<EmptyDataTemplate>
<asp:FileUpload ID="FileUpload1" runat="server" />
</EmptyDataTemplate>
</asp:GridView>
now you have to use Gridview.FindControl To find particluar Fileupload control and do the needful operation.
Good luck !!!
cheers,
Abhijit
|
|
|
|