|
Let the pages inherit from a custom base page, which inherits from the Page class. In this class define a protected variable.
|
|
|
|
|
|
Hi Hi
Please help me with this one,when the user click generate info Button to display the report on the next web page,the report should be displayed accoding to the selected starting date up to selected finishing date.
oga m
|
|
|
|
|
write a query like
<br />
SELECT * FROM TABLENAME<br />
WHERE DATE BETWEEN FROMDATE AND TODATE<br />
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Hey there,
I am trying to edit a datagrid. Whenever I click the edit button the grid enters edit mode. But when I change the text in the textbox and click the update(link button) the textbox always goes back to the previous text that was in it.
How do I extract the text from the textbox in the datagrid without losing my change.
below is my code for the update process:
public void Update_dgMilage(object sender, DataGridCommandEventArgs e)
{
TextBox StartMiles = new TextBox();
TextBox EndMiles = new TextBox();
TextBox PersonalMiles = new TextBox();
TextBox BusinessMiles = new TextBox();
TextBox TotalMiles = new TextBox();
StartMiles = (TextBox)e.Item.Cells[3].FindControl("txtStartMiles");
EndMiles = (TextBox)e.Item.Cells[4].FindControl("txtEndMiles");
PersonalMiles = (TextBox)e.Item.Cells[6].FindControl("txtPersonalMiles");
BusinessMiles = (TextBox)e.Item.Cells[7].FindControl("txtBusinessMiles");
TotalMiles = (TextBox)e.Item.Cells[8].FindControl("txtTotalMiles");
string connectionString = ConfigurationSettings.AppSettings["connectionString1"];
OracleConnection con = new OracleConnection(connectionString);
con.Open();
string SQLText = @"update appl_support.HSC_LEASED_CAR_MILES set RPE_MILE_START = '" + StartMiles.Text.ToString() + "', RPE_MILE_END = '" + EndMiles.Text.ToString() + "', PERSONAL_MILES = '" + PersonalMiles.Text.ToString() + "', BUSINESS_MILES = '" + BusinessMiles.Text.ToString() + "', TOTAL_MILES = '" + TotalMiles.Text.ToString() + "' where LCM_PKEY = '" + e.Item.Cells[1].Text.ToString() + "'"; //e.Item.Cells[1].Text.ToString()
// assign query and execute
OracleCommand cmd = new OracleCommand(SQLText,con);
cmd.ExecuteNonQuery();
con.Close();
con.Dispose();
//gets datagrid out of edit mode
dgMilage.EditItemIndex = -1;
getLeaseMilage();
}
Please Help anyone
|
|
|
|
|
For starters you don't need to instantiate a new text box for each of the variables, its just a waste of objects since you then override them straight away. Just use TextBox StartMiles = (TextBox)e.Item.Cells[3].FindControl("txtStartMiles");
What event of the GridView is this method attached to?
How are you databinding the GridView in the first place? If your using a data source control (like SqlDataSource or ObjectDataSource) it would be much easier to configure the UpdateCommand on the data source properly.
|
|
|
|
|
|
Hi all,
I have an Access database linked to ASP,NET, using VB. In the ASP.NET code, on the page load, i want to create a table in my Access database, im not sure how to do this, can anyone help? Thanks
|
|
|
|
|
|
How can i capture the events of "open" & "save" button clicked of a file download dialog box, at the server through an ASP.NET Web Application ? Is there any classes for file download in .Net framework, through which we can create a reference to the file dialog events ?
I will be very happy if i could get some information related with C#.
If any body could give any information or if any body could give some links i will be grateful.
jij
|
|
|
|
|
The browser implements the file dialogue box client side so there is no way to get its properties server-side. As far as I know no browser exposes these events in Javascript.
|
|
|
|
|
For security reasons, web browser may not allow such options.
|
|
|
|
|
Dear all,
i am making small web application using ASp.net , C# (VS2005).
Actually through this utility one can attach crystal report to web application without making any change in the code.
i am loading crystal report thrugh following code
reportdocument = new ReportDocument();
reportdocument.Load(reportpath);
CrystalReportViewer1.ReportSource = reportdocument;
Now my problem is in one report . when i run through IDE(VS2005),
it shows the output but when i do the same. it does not show any
output. please suggest some idea where i am going wrong ?
thanks
regards
imran khan
|
|
|
|
|
how do you deploy your application on the server ?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
its basiclly a small web application. i implement it in intranet through virtual path. other report are running fine but only one report have a problem.
thanks for quick reply
regards
imran khan
|
|
|
|
|
what was the error?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Any warnings or error messages shown?
|
|
|
|
|
Actually it does not show any error nor does its show output.
but when i run through IDE its show output.
what is the problem?
regards
imran khan
|
|
|
|
|
I am sending bulk emails using asp.net with vb.net. Is it possible to keep track of sent mails? My problem is:
- I want to get all mails in my sent items folder (of my mail account)
- If mail is not delievered, I want to get a list of mails which are sent successfully and which mails undelievered due to any problem like unknown email id ?
- Any suggestion to use xp_sendmail stored proc using SQL Server 2000 to handle this situation?
Thanks.
|
|
|
|
|
I used a method which is not bullet proof, but gives you an idea of the sent mails. There are loads of but's and if's involved though...
I sent HTML mails including a picture of 1 by 1 pixel. The image comes from a dynamic webpage. The source of my html mail contains the image tag
<br />
<img src="http://www.server.com/mailimage.aspx?mailingid=12345&contactid=12345"><br />
As said, mailimage.aspx returns an image which allows you to hide the image. Mailingid and Contact id allowed me to set some database flags.
Also, when my html mail contained links, for example
<br />
[a href="http://www.google.com"]google[/a]<br />
I changed the link to a diffrent link
<br />
[a href="http://www.server.com/redirect.aspx?link=http://www.google.com&mailingid=12345&contactid=12345"]google[/a]<br />
which also allowed me to keep track of clicked links. However as you can understand, this technique is far from bullet proof and only works when the receipient accepts html mail, and allows you to display pictures. The links still work, which enables you to get some feedback.
|
|
|
|
|
hi any one can tell how to use menu bars in asp.net,
using html menubars i did it in asp.net,
But i am not satisfy with that,
anyone can tell,easy way for that,
Magesh
|
|
|
|
|
VS 2005 have inbuild Menu Control use it Might be helpfull
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
hi i have only 2003.....,based upon if any option is there tell me........
Regards And Friendly,
Magesh
|
|
|
|
|
U can use a third party control for menu called 'skmMenu'.
Google it and get it...its really good.
|
|
|
|
|