|
Hai Friends,
I put a label in master page enabled page.I want to get the id of that label in another page where the second page is not a masterpage enabled page.How i get the label control id in the second page.Please help me.
|
|
|
|
|
You can't, if it doesn't use the master page, then the masterpage does not exist for that page lifecycle. You need to store it in the session or something.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
please send some code how to convert the session to control.
|
|
|
|
|
string labelid =(Label)session("name");
umerumerumer
|
|
|
|
|
I am developing website using C# with ASP.net.
one page I am inserting data into hashtable after reach 1000(>1000),Add it into Array list than Insert into Database...here sometimes saying Exception like
Item has already been added. Key in dictionary: '12' Key being added: '12'
...Please help me with this.....How to avoid this Eception...
and I am using following code..
public static Hashtable ht = new Hashtable();
public string Crid="";
Crid = ht.Count.ToString();
string[] st = new string[4];
st[0] = Crid;
st[1] = "5654546456";
st[2] = "0";
st[3] = "1";
if (ht.Count<1000)
{
ht.Add(ht.Count, st);
}
else
{
ArrayList list = new ArrayList();
foreach (int key in ht.Keys)
{
list.Add(ht[key]);
}
ht.Clear();
ht = new Hashtable();
ht.Add(ht.Count, st);
for (int j = 0; j < list.Count; j++)
{
//here Inserting data into Database
}
}
Raaj
|
|
|
|
|
Isn't it obvious ? Don't add a key that is already there. So, check if the key exists and if it does, decide if you want to change the value that's there, or leave it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you are using a static variable in a web application, you have to synchronise all access to it. The reason for the error is that two users are adding items at the same time. You are lucky that you got such a descriptive error message, you could just as well have corrupted the HashTable and got some internal error in the HashTable code...
Use a List instead of a HashTable. You are only using the key of the HashTable as an index anyway.
Instead of copying the items one by one into a new collection, just keep them in the collection where they are.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello All,
Using asp.net and c# 2005 Retreiving data from a View on SqlServer 2005.
While retreiving less number of records its working fine and showing data,while retreiving more records like millions billions of data then not getting data showing timeout exception, Can you give me any solution for this to retreive whole data fastly
Thanks in advance
Gopi
Gopi
|
|
|
|
|
What sort of retard would ask for millions of records and expect it to be responsive ? What sort of UI would you expect to use to show millions of records ?
Fix your SQL so it only returns the data you want to show and make your page size sensible. Then it will work fine.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
In sql query is running fine,While fetching less number of records working fine in code,where as taking time to fetch more than one lakh records,
|
|
|
|
|
I understood that. Like I said, to try to display 100,000 records, is plain retarded. You're not showing that many records in one page, are you ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am not showing that many records in a page,
I have a view with more joins and unions,In that records I have more than 100,000 records,Now from this view I am filling the dropdowns based on some conditions we are filtering,So for that filtering it may doing sequential search in that view.while doing this I am getting timeout exception
This is the case am getting TIME OUT EXCEPTION.
Thanks in advance
Gopi
gopi
|
|
|
|
|
Hai all
I am using vs2005 web application and using infragistics controls .
I need to set scrollbar for datepicker year and month dropdown ,how to set
it. Can anyone help me .
|
|
|
|
|
I reckon the Ingragistics people would be a good place to start.....
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I guess u would ve Infragistics Help file along with your infragistics Tool.
So u can make use of it.
You should put some effort to find out the solution...
|
|
|
|
|
Hi,
How does AutoEvent wire up works in ASP.net? I mean what are internals, where it registers the event? Can i check the registered code in tools like reflector or something else?
Thanks in advance..
Satish
Satish
|
|
|
|
|
I assume the compiler looks for specifically named methods and hooks them up. Why do you ask ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
how to open a excel using link button...
|
|
|
|
|
Point to the XLS and hope that the user has Excel on their machine ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
<a href ="REPORT1.XLS"class = "nav1">REPORT</a>
I USED THIS CODE TO OPEN EXCEL SHEET...
THE ABOVE EXCELL SHEET IS PRESENT IN MY PROJECT ITSELF....
I WANT TO JUST OPEN AND SEE THE EXCEL SHEET WHICH WAS LOCATED IN MY d:
|
|
|
|
|
kulandaivel_mca2007 wrote: I WANT TO JUST OPEN AND SEE THE EXCEL SHEET WHICH WAS LOCATED IN MY d:
Don't shout. If the sheet is on your local drive, how is that a real world situation ? You may be able to link to it in your HTML, but how do you know what excel sheets will be on your users local drives ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
u are right....
i have only the file name i have to open that how can do this...
|
|
|
|
|
protected void abc(object sender, EventArgs e)
{
//LinkButton lk = (LinkButton)sender;
//Response.Redirect("default.aspx");
// Server.Transfer("default.aspx?ArtID=" + lnk.Text);
// GridView gvr = (GridView)sender;
LinkButton lb = new LinkButton();
lb = ((LinkButton)sender);
string strUrl = "~\\aijaz\\" + lb.Text;
Response.Redirect(strUrl);
}
call this on linkbutton onclick="abc"
|
|
|
|
|
u are giving solution for excel file present in my project...
it is working fine....
but my requirement is opening the excel file present D:
|
|
|
|
|
http://www.codeproject.com/KB/aspnet/fileupload.aspx[^]
It covers the following 6 areas-
* How to set up a form for file uploading
* How to receive uploaded files on the server side
* How to save uploaded files to hard drive
* How to save uploaded files in a database
* How to retrieve a file that is stored in a database and return it to a client
* Security considerations running the demo project
|
|
|
|