|
Hi Mate,
Trace is indeed a good option.
Here is another way ...
To examine time taken executing a number of statements:Server Side:
====================================================================
<br />
StartTime = Environment.TickCount;<br />
{<br />
}<br />
EndTime = Environment.TickCount;<br />
double executionTime = (double)(EndTime - StartTime) / 1000.0;<br />
<br />
Response.Write(executionTime.ToString());<br />
if you want to see the execution time of the page .. declare StsteTime and EndTime as global variable.
To examine time taken executing a number of statements:Client Side:
====================================================================
var StartTime,EndTime,ExecutionTime;
var d = new Date();
StartTime = d.getTime();
var d2 = new Date();
EndTime = d2.getTime();
ExecutionTime = EndTime - StartTime;
alert(ExecutionTime);// in milliseconds
Arindam
|
|
|
|
|
Hi,
I have to insert 200,000 rows from datatable (from asp.net 2005 webform(vb.net 2005 code behind ) to oracle 10g table.Here if i insert this by row by row then it will not work,so i need some bulk insert from asp.net to oracle.
can anybody suggest some good way to do it.Here we need to take care that as rows are too much large so server or client should not hang.
If some code/link is available then it could be helpful to me.
thanks
montu3377
|
|
|
|
|
Hi ,
Please refer to SqlBulkCopy class in .NET 2.0.I have used this class to insert 1000 rows from ASP.NET to SQL SERVER 2005.I do not know whether it can be used with Oracle or not.So please find out if this class is helpful to you.
Thanks,
vicky
Vicky
|
|
|
|
|
I guess SQLLoader in Oracle 9i is the best option for bulk data insertion.
Arindam
|
|
|
|
|
Hi,
To insert 200,000 records into oracle it's taking around 10 mints time by using Sql loader utility method,so can you pls. suggest some good method which insert records very quickly.
I am using .csv file which containts around 200,000 records.I want to insert that records from asp.net to oracle 10g.
Can you pls. suggest better way to do it.
thanks.
montu3377
|
|
|
|
|
I have to fill a survey form with data from an oracle database.
We debate two ideas: use a dataset object or a XML file.
For XML file I would use forward only method of reading the file and not DOM, faster.
Is it more efficient generating the XML from database and then parsing the XML on the application server then using a data set returned from the database ?
Thank you
|
|
|
|
|
Since this is posted to the ASP.NET forum I'll assume you want to bind the results of your Oracle database query to controls on a webform. In that case a dataset would be the way to go. Using databinding this would be faster and easier than usage an XML file. You could also use XSLT to transform your XML into HTML but depending on your requirements to update or refresh the form it might not be viable.
only two letters away from being an asset
|
|
|
|
|
Hello guys. I am using this sample out on http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/apps/cookies1/cookies1.src&file=CS\Customize.aspx&font=3 to perform some user based changes to the page (such as backgroundColor, font size etc) . It’s working just fine. But the page only updates the info that user selected from the drop down lists, when you click the submit button twice. Do you guys know why this might be happening??? In the button click events handler, this is what I’ve got:
public void btnSubmit_Click(object sender, System.EventArgs e)
{
HttpCookie cookie = new HttpCookie("preferences1");
cookie.Values.Add("ForeColor",ForeColor.SelectedItem.Value);
cookie.Values.Add("BackColor",BackColor.SelectedItem.Value);
cookie.Values.Add("LinkColor",LinkColor.SelectedItem.Value);
cookie.Values.Add("FontSize",FontSize.SelectedItem.Value);
cookie.Values.Add("FontName",FontName.SelectedItem.Value);
Response.AppendCookie(cookie);
if ( ViewState["Referer"] != null )
{
Response.Redirect(ViewState["Referer"].ToString());
}
}
Please check out the actual code sample at the link shown above.
Thanks
Tina
|
|
|
|
|
How do you know that it is updating on clicking the button twices? Is it a Dbl Click??????
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
hello there, thanks for the response...well I know because when i click the button once it does not update the colors...when I click it again, then it does it. Isn't that weird? Please help?
-- modified at 0:21 Saturday 30th December, 2006
|
|
|
|
|
Think, its updating the cookie on the first click itself... But the retrieving process is not properly handled... Could you post your code?
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
Hi,
I am binding a site map data source to the menu control. Some node titles are very long. I sent the Menu Item width, but some items are still longer than others. Since the menu need to display vertically. That makes the menu look bad. Is there a way to make the menu text wrap automatically?
Any help would be appreciated!
Thanks in advance!
|
|
|
|
|
Did you have the same issue???
|
|
|
|
|
Hi,
Use ItemWrap property of Menu control.
Sandip Kansara
Software Engineer
India.
|
|
|
|
|
thanks. I already figured it out.
|
|
|
|
|
Hello all,
I'm using Visual Studio 2005 to build a small application for applying for a job. The applicant answers a series of questions and uploads their resume. Or they should be able to do so. The resume upload step isn't the last step in the wizard, and it appears that the value of the file upload control is lost between postbacks. Is there a simple way to fix this problem?
|
|
|
|
|
Hi,
Which event are you using with Wizard control, i.e. OnActiveStepChanged or OnFinishButtonClick ?
The event OnActiveStepChanged posts back the page on every wizard step, while OnFinishButtonClick posts back page once only at the finishing step.
Hope this would be useful.
Sandip Kansara
Software Engineer
India.
|
|
|
|
|
im very new to NET and i apologize if this is a fundamental question, but i need some help.
i have an ascx file (inherits a cs file) loaded into an aspx file. in this code example, i click on the ascx file's radiobuttonlist. the radiobuttonlist's onselectedindexchanged methods fires a method in the ascx cs file. the cs method takes the value from the ascx radiobuttonlist and sets a cs property to the radiobuttonlist's selectedvalue. also, it takes sets a literal in the ascx file to the property value. in the aspx file, during the page_load, i call the ascx file's property and set the value to a literal inside the aspx file (but not in the ascx file). the code kind of works, but it's one click late. when i change the ascx radio buttons, the ascx literal updates. however, intially, the aspx literal does not change. the aspx literal does not change until the second radio button click.
i would greatly appreicate any help with this one. thanks from a newbie
void Page_Load(object s, EventArgs e)
{
string strControl;
Control ctl;
strControl = "radio";
ctl = LoadControl(strControl + ".ascx");
//((radio)ctl).choiceValue = "";
pl_radio.Controls.Add(ctl);
litResult.Text = ((radio)ctl).choiceValue;
}
<title>Radio Default File
<asp:placeholder id="pl_radio" runat="server">
From ASCX choicevalue property set during oo button click or radio
select change :
<asp:literal id="litResult" runat="server">
++++++++++++++++++++++++++++++++++++++++
ASCX file -
<%@ Control Language="C#" AutoEventWireup="true" Inherits="radio" %>
void Page_Init(object s, EventArgs e)
{
//choiceValue = "red";
}
<asp:radiobuttonlist id="rad_Choice"
="" onselectedindexchanged="button_click" autopostback="true" runat="server">
<asp:listitem text="Choice 1" value="1" selected="true">
<asp:listitem text="Choice 2" value="2">
<asp:literal id="litChoice" runat="server">
<asp:button id="btn_radio" onclick="button_click" text="Submit"
runat="server">
+++++++++++++++++++++++++++++++++++++++
CS compiled - radio
public class radio:UserControl
{
public radio()
{
//
// TODO: Add constructor logic here
//
}
protected RadioButtonList rad_Choice;
protected Literal litChoice;
private string _choiceValue;
public string choiceValue
{
get
{
return rad_Choice.SelectedValue;
}
set
{
_choiceValue = value;
}
}
public void button_click(object s, EventArgs e)
{
choiceValue = rad_Choice.SelectedValue;
litChoice.Text = choiceValue;
}
}
-- modified at 16:05 Thursday 28th December, 2006
|
|
|
|
|
i found the answer in google. by adding the loadcontrol in the aspx page_init and then retreiving it in the page_load, i was able to get the ascx property value after each radiobutton click.
<%@ Page Language="C#" AutoEventWireup="true" %>
protected Control ctl;
string strControl;
void Page_Init(object s, EventArgs e)
{
strControl = "radio";
ctl = LoadControl(strControl + ".ascx");
//((radio)ctl).choiceValue = "";
pl_radio.Controls.Add(ctl);
}
void Page_Load(object s, EventArgs e)
{
litResult.Text = ((radio)ctl).choiceValue;
}
<title>Radio Default File
<asp:placeholder id="pl_radio" runat="server">
From ASCX choicevalue property set during button click or radio select change :
<asp:literal id="litResult" runat="server">
|
|
|
|
|
Hi.
Does anyone knows the way to parse (extract) data from Excel and CSV files?
Any help is appreciated.
Thank you,
Alex.
|
|
|
|
|
Eventhough I haven't come through that case, you can try OleDB or Excel.Application...
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
I've heard about Excel.Application before. Do you know what library I should use?
Thank you,
|
|
|
|
|
Microsoft Office 11.0 Object Library
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
Thanks. Do you have any examples. I can't find anything on the net.
|
|
|
|
|