Ap per my knowledge query string is the best option to pass values to other sites/web pages. Hope this helps.
Hope this helps.
Ap per my knowledge query string is the best option to pass values to other sites/web pages. Hope this helps.
Hope this helps.
clear the textbox where the data is displayed at page loading. hope this helps.
Hi,This is first time that i am trying to connect to an OPC server(KEP and MATRICON). I dont have any idea about it, so please can anybody guide me through how to connect to an OPC server(KEP and MATRICON) & fetch values from it. I am using ASP.net with C#. Thanks in advance.
modified on Tuesday, June 1, 2010 8:03 AM
Hi i am building an application in which i want to generate a report. That report consists of data from multiple tables. I tried doing this but when the datagrid is populated with the dataset/datatable the record from second table comes on second row & from third table comes on third row. I am using access database. can someone help me out of this. Thanks in advance. the code is as shown below. private void Form1_Load(object sender, EventArgs e) { try { con = new OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=e:/ReportTest/ReportTest/ContractSystemDB.mdb"); con.Open(); ds = new DataSet(); dt = new DataTable("ashish"); cmd = new OleDbCommand("select * from CommonData",con); rd = cmd.ExecuteReader(); if (rd.HasRows) { while (rd.Read()) { da = new OleDbDataAdapter("select * from InitialApproval where InitialApproval.PrNo='"+rd.GetString(0)+"'",con); da.Fill(ds); da.Dispose(); da1 = new OleDbDataAdapter("select EstimatedVal,FwdDtByPSD from PSDApproval where PSDApproval.PrNo='" + rd.GetString(0) + "'",con); da1.Fill(ds); da1.Dispose(); da2 = new OleDbDataAdapter("select POValue,rcd_dtCC,saving from CommonData where CommonData.PrNo='" + rd.GetString(0) + "'", con); da2.Fill(ds); da2.Dispose(); } } contractSystemDBDataSetBindingSource.DataSource = ds; MyGrid.DataSource = contractSystemDBDataSetBindingSource.DataSource; MessageBox.Show("Record Added To Grid View"); } catch (Exception ex) { MessageBox.Show("Error==>" + ex); } finally { con.Close(); } }
Hi I am generating an report by using crystal report and access database in C#. the code which i have writeen works fine, but it displays multiple records. that is if there are two records to display it displays four records i.e it displays each record twice. i have executed the queries on the page load event in an dataset & binded that dataset to crystal report str1,str2,str3,str4 are the variables declared within constructor.the code i have written is displayed below. Thanks in advance. private void ViewPSDClearedReport_Load(object sender, EventArgs e) { try { crystalReportViewer1.DisplayGroupTree = false; if (str3 == "All") { //IF NO PURCHASE GROUP IS SELECTED MessageBox.Show("All"); ds = new DataSet(); rpt = new PSDClearedCrystalReport(); con = new OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=e:/Ashish/Practice/ContractSystem/ContractSystem/ContractSystemDB.mdb"); con.Open(); cmd = new OleDbCommand("select * from PSDApproval where InitialPSD='" + str4 + "' and FwdDtByPSD between '" + str1 + "' and '" + str2 + "' order by FwdDtByPSD", con); rd = cmd.ExecuteReader(); if (rd.HasRows) { MessageBox.Show("Record present so reading"); while (rd.Read()) { string pr; pr = rd.GetString(0); MessageBox.Show("PR==" + pr); da = new OleDbDataAdapter("select PrNo,Description,ValueQuoted,PurchaseGrp,RcdDtEA,FwdDtPSD,Initial from InitialApproval where InitialApproval.PrNo='" + pr + "'", con); da.Fill(ds, "InitialApproval"); da.Dispose(); da1 = new OleDbDataAdapter("select EstimatedVal,FwdDtByPSD from PSDApproval where PSDApproval.PrNo='" + pr + "'", con); da1.Fill(ds, "PSDApproval"); da1.Dispose(); } } rpt.SetDataSource(ds); crystalReportViewer1.ReportSource = rpt; MessageBox.Show("Record Added To Report"); } else {
this is the code of my .aspx file <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <br /> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> <br /> <asp:ScriptManager ID="ScriptManager2" runat="server"/> <asp:Timer ID="Timer2" runat="server" Interval="5000"/> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" /> </Triggers> <asp:AdRotator ID="AdRotator2" runat="server" AdvertisementFile="~/AdRotatorFiles.xml" KeywordFilter="small"> </asp:AdRotator> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html> and in the .cs file i have written the following code. protected void Timer2_Tick(object sender, EventArgs e) { UpdatePanel2.Update(); Label1.Text = "Done"; } thanks in advance
this is the code of my .aspx file <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <br /> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> <br /> <asp:ScriptManager ID="ScriptManager2" runat="server"/> <asp:Timer ID="Timer2" runat="server" Interval="5000"/> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" /> </Triggers> <asp:AdRotator ID="AdRotator2" runat="server" AdvertisementFile="~/AdRotatorFiles.xml" KeywordFilter="small"> </asp:AdRotator> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html> and in the .cs file i have written the following code. protected void Timer2_Tick(object sender, EventArgs e) { UpdatePanel2.Update(); Label1.Text = "Done"; } thanks in advance
the ad rotator is exactly inside the update panel yet it is not working. can you provide me the code for it. thanks in advance.
can you provide me the code please.
hi, i m developing a web system. i want to flash some news where i want only the news to be refreshed and not the whole page. i tried using add rotator along with ajax control i.e update panel, but still it is not working. can anyone provide me the code to do the same.
hi i am trying to retrieve data from access databases multiple tale into a dataset, with dataset iam trying to populate the crystal report of C#. but after doing all this procedure the data is displayed multiple times. i dont know where i have gone wrong. can any one help me out of this. the code written is as follows namespace ContractSystem { public partial class ViewPSDClrdReport : Form { OleDbConnection con; OleDbDataAdapter da,da1; OleDbCommand cmd,cmd1; OleDbDataReader rd,rd1; DataSet ds; DataTable dt; PSDClrdCrystalReport rpt; string str1, str2, str3,str4; public ViewPSDClrdReport(string s1,string s2,string s3) { InitializeComponent(); str1 = s1; str2 = s2; str3 = s3; } private void ViewPSDClrdReport_Load(object sender, EventArgs e) { crystalReportViewer1.DisplayGroupTree = false; try { con = new OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=e:/Ashish/Practice/ContractSystem/ContractSystem/ContractSystemDB.mdb"); con.Open(); ds = new DataSet(); rpt = new PSDClrdCrystalReport(); if (str3 == "All") { cmd = new OleDbCommand("select PrNo from PSDApproval where FwdDtByPSD between '" + str1 + "' and '" + str2 + "'", con); rd = cmd.ExecuteReader(); if (rd.HasRows) { while (rd.Read()) { str4 = rd.GetString(0); da = new OleDbDataAdapter("select PrNo,Description,ValueQuoted,PurchaseGrp,RcdDtEA,FwdDtPSD,Initial from InitialApproval where InitialApproval.PrNo='" + str4 + "'", con); da.Fill(ds, "InitialApproval"); da.Dispose(); da1 = new OleDbDataAdapter("select EstimatedVal,FwdDtByPSD from PSDApproval where PSDApproval.PrNo='" + str4 + "'", con); da1.Fill(ds, "PSDApproval"); da1.Dispose(); MessageBox.Show("ALL ADDED"); } } //rpt.SetDataSource(ds); }
hi I am creating an C# Application in which i am accepting values from the user for ex an ID. Depending on that id value i want to generate reports. the problem is that the ID is in many tables and i want data from all that table. can anybody help me out of this. Thanks in advance.
hi i am designing a web site in which i want to execute different ACCESS queries after a specific time interval ex:- 5 SECONDS. I am using ASP.net with C# and access as database. Thanks in advance!!
please describe your question in detail. what exactly do u need.
hi i want to populate gridview with list of files within a directory which is a part of my project. and when user clicks on any file name then that file should open. I am using ASP.net with C#. i have pupulated the grid view with list of files but when i click on the file name it gives an error. Can anybody help me out of this. thanks in advance.
modified on Friday, February 20, 2009 5:23 AM
i am developing an application in aSP.net using C#, in which i want to store the files path into access database and then i want to open this file when user clicks on the particular link. can anyone help me out of this. it's really very urgent. remember i am using ASP.net with C#. Thanks in advance.
Hi!! I have Binded list of files from a directory into datagrid. i have also added an hyperlink to the datagrid so that the particular file will open after clicking it. But when i do so i get an error message as follows.. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /TestMain/Needle brg and oil seal pressing.pdf THE PAGE_LOAD CODE IS protected void Page_Load(object sender, EventArgs e) { try { //String[] f = Directory.GetFiles("c:/gearfactory"); dir = new DirectoryInfo(Server.MapPath("~/gearfactory")); articleList.DataSource = dir.GetFiles("*.pdf"); //articleList.DataSource = f; articleList.DataBind(); } catch (Exception ex) { Response.Write("Error :-" + ex); } } THE DATAGRID SOURCE CODE IS <asp:HyperLinkColumn DataNavigateUrlField="Name" DataTextField="Name" HeaderText="File Name" /> <asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Write Time" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" /> <asp:BoundColumn DataField="Length" HeaderText="File Size" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,### bytes}" /> </Columns> </asp:DataGrid> Can some one help me with this. Thank you in advance. Ashish.
HI!! i have inserted image into access database. i actually want to store the address of that particular image in database. so that at the time of retrieval i will pass that address in the ASP.net image url in order to display the image. can someone help me to do this please. i have written the code in C#. Thanks in advance.