|
for asp.net 2.0 What is difference between following methods for selecting XML data. which one is better interms of performace.
1) Dataset.select
2) dataview
3) xmlDocument.SelectNodes
4) xmlNavigator.select
modified on Monday, January 19, 2009 2:41 AM
|
|
|
|
|
Member 3981366 wrote: Dataset.select
There is no Select method in DataSet class. Also, DataSet is not designed for XML manipulations.
Member 3981366 wrote: dataview
What this has to do with XML?
Member 3981366 wrote: xmlDocument.SelectNodes
XMLDocument.SelectNodes or XMLDocument.SelectSingleNode with XPath expression will be fast.
Member 3981366 wrote: xmlNavigator.select
AFAIK, this class is no longer used.
|
|
|
|
|
Hi to all,
I have a datagrid in which there is a checkbox and a textbox.
The user can change the value in textbox.
below there is update button.When the user presses the update button
the textbox value should be updated.
For this I have done this:
protected void BtnUpdate_Click(object sender, EventArgs e)
{
dt = (DataTable)Session["data"];
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
CheckBox chkSelected = new CheckBox();
foreach (DataGridItem dgItem in DataGrid2.Items)
{
chkSelected = (CheckBox)dgItem.FindControl("chkSelection");
if (chkSelected.Checked != true)
{
TextBox TxtQTY = (TextBox)dgItem.Cells[2].FindControl("TxtQTY");
string Txt2 = TxtQTY.Text;
}
else
{
int a = 1;
}
}
}
The problem is that this functionality is not taking the user input.
In the starting I have done databing because of which it is taking the previous value.But if I will not bind the data It is not going in the foreach loop to check wether any checkbox is selected or not as in debugging it is showing that the item collection in the datagrid is empty.
Please give some suggestions...
Thanks in advance.
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: dt = (DataTable)Session["data"];
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
Problem is in above code.
You are rebinding DataGrid before fetching new values from textbox. This will over write all the previously entered text.
Try moving this code after you have read value from textbox
|
|
|
|
|
Why is the datagrid losing all the items. You may be doing something before reaching to this event.
Apurva Kaushal
|
|
|
|
|
sneha Choudhary wrote: DataGrid2.DataSource = dt;
DataGrid2.DataBind();
This will clear the values changed in the textbox. Why do you need to rebind the grid?
sneha Choudhary wrote: //if I will not bind then it will not go in foreach loop.
//as it will not find any items in the datagrid.
Which event are you using for binding the grid? Is viewstate enabled for this control?
|
|
|
|
|
Hi,
I got the problem.Actually It was regarding the postback.
Thanks a lot.
cheers,
sneha
|
|
|
|
|
Hello everybody..in my application i have to show a indication whether i am connected to internet or not..
|
|
|
|
|
meghamaharshi wrote: in my application i have to show a indication whether i am connected to internet or not..
You want to mean , that you need to show all the user list that are currently logged in into your application ?
|
|
|
|
|
Thanks for reply..
But i just want to show the status internet is on or not...
|
|
|
|
|
If it is a web application (not intranet) then obviously the user is connected to internet.
Apurva Kaushal
|
|
|
|
|
its web application which is being run on Lan making virtual directory..
|
|
|
|
|
do you really want this in your web application. Bcos we often need this for Windows Application.
For windows use:
System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged += new System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler(NetWorkChangedCallback);
Abhishek Sur
|
|
|
|
|
yes i want it for web application..
|
|
|
|
|
This has to be the dumbest thing I have ever heard.
If you're on a LAN and you want to know if an internet connection exists or not, just ping google or microsoft and if you get a reply or not, you'll know if you're online.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes Christian is Right.
For web application, just make an object of XMLHttpRequest and do an AJAX call to any page using SetInterval, so that this ajax call will occur after a certain time. And show the status message based on the reply from the server.
Thats all is possible in WEB...
Abhishek Sur
|
|
|
|
|
hi mates,
how would i know the full directory path of web host server. I couldn't connect to my database (Web Hosting Suite). In my local machine it is C:\Inetpub\wwwroot\mywebsite\kijun.mdb.
I tried the DSN Management in Web Space Configuration but it seems only mysql is available and my database is oledb.
Thanks in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
|
Server.MapPath(); no, not this one.
what i mean is i have a free ASP.NET host. I can only access the control panel and ftp. But i don't know where they put the wwwroot directory.
I want to know where they put the directory path of wwwroot so that i can put the connection string on the webconfig file.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
modified on Monday, January 19, 2009 2:41 AM
|
|
|
|
|
C#Coudou wrote: what i mean is i have a free ASP.NET host. I can only access the control panel and ftp. But i don't know where they put the wwwroot directory.
I want to know where they put the directory path of wwwroot so that i can put the connection string on the webconfig file.
I mean this too,
try this:
create a simple aspx page with this code on page_load:
Response.Write(Server.MapPath(""));
then upload the aspx page on your free host, and browse it and see your result.
|
|
|
|
|
I want to get the object of local report from report viewer. from it i want to work on subreport also so i want the object of subreport from it.
|
|
|
|
|
are you talking about RDLC Reports.??
Abhishek Sur
|
|
|
|
|
ya i m talking about rdlc report...
|
|
|
|
|
I have got 2 panels on my page,Say,
Panel1 with DefaultButton Button1,ValdationSummary1 and some textboxes.
Here same validation group is assigned to Button1 & ValdationSummary1
Panel2 with DefaultButton Button2,ValdationSummary2 and some textboxes.
Here also same validation group is assigned to Button2 & ValdationSummary2
On pressing Enter key,if I am in panel1 ,it is supposed to execute Button1_Click(), but here it is not even firing any event. And even after clicking on Button1, it is showing me ValidationSummry2's error messages(i.e. textboxes in panel2 are blank.)
However, it works without the Validation summary controls.But I cant remove them from the page for some reason.
Now, what I want to do is,in whichever panel I am working in, On pressing Enter key,it should fire that particular panels' default button's click event & should not check the validations in another panel.
Can anyone please suggest me,how can I achieve this...
Thank You.
|
|
|
|
|
Hi all ,
I want to prepare my custom control which inherits from grid control
The control must bind the data at runtime where no of columns can be unknown and also i want to hide some columns,depending on the user input[property set].
There are also many things to be done like some times use tree control inside it.
If double click on any row open a new .aspx page set by user and transfer that row content to that page[parent/child].
Please provide me link where i can find detail docs for this as i hv tried searching on google but cant find the relevant.
Scotchy
|
|
|
|