|
If you don't re-populate the dropdown list, the values will be kept in the viewstate, as already been mentioned.
If you do re-populate the dropdown list and the record still is there, it's because the code that re-populates is executed before the code that deletes.
The OnLoad event occurs before any button event, so if you re-populate the list in OnLoad, that will occur before the OnClick event deletes the record. You can use the event OnPreRender that occurs after the control events to re-populate the dropdown list.
---
Year happy = new Year(2007);
|
|
|
|
|
Dear Guffa
I re populated the dropdpwnlist through the prerender, without any good result...
I perform the deletion on button clicked, and the drop down is populated on button click...
Thanx alot
Nour
|
|
|
|
|
Dear All
I created a website using vs 2005 and i want to add this option to the admin
I want to retrieve all the web pages in the web project
Is there a control to show it? Or how can i implement that?
I'll using to set permissions for users acces so can i bind it to a checkbox list?
Thanx in advance
Best Regards
3ala2
|
|
|
|
|
You want to retrieve a list of page names? Or you want to retrieve the full page content for all pages?
|
|
|
|
|
i want to retrieve a list of page names
Best Regards
3ala2
|
|
|
|
|
|
Hi all,
I'm confused by a performance problem which is making life rather difficult at the moment. We have a webserver running ASP.NET 2.0 with a combination of aspx pages and asmx webservices. Occasionally, the asmx services slow down to desperately slow speeds, but the aspx pages are unaffected. After 20-30 minutes it speeds up again.
Stranger yet, if I remote desktop into the server and try calling the webservices through a browser (http://localhost.....) there is no performance problem. So in summary all works well except for asmx services when called from another computer and only occasionally.
Any ideas?
Regards,
Rob Philpott.
|
|
|
|
|
You may want to run Performance Monitor on the server and monitor things there. Plus, you will want to look at the event log and see if there is anything odd happening there.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks Pete,
I have a feeling my threadpool might be running dry. This wasn't a problem on a dual-processor server, but now its on a single processor server and my threadpool threads have been halved I think there's locking problems.
Curious it doesn't affect aspx pages though....
Regards,
Rob Philpott.
|
|
|
|
|
Your aspx pages probably aren't doing the churning processing that your web service is doing. You could well be right about the threadpools. You may want to look at a threadpool alternative. There are a couple here on CP.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
It might be something like this: Sometimes it's all in the numbers[^]
Though, the fast performance on the local system is strange.
You might also want to consider adding your own performance counters to your application and monitoring them, it can give you a much better idea of what's going on with the system.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
hi friends,
i am using dropdownlist in gridview and i am using sqldatasource to bind the data in the dropdownlist the query in the datasource is like this select area_no,area_name from areas.
the dropdownlist is filling with the above query what i need is to add one more value to it like text="select" and value=0 how can i do this
regards jabbar
jabbarsb
|
|
|
|
|
Off the top of my head.
Listitem li = new ListItem();
li.text = "Selected";
li.value = "0";
dropdownlist.items.insertAt(0, li);
|
|
|
|
|
Hi,
I need help in how to transfer the data in excel sheet to access database table. I have created for example an excel worksheet Login.xls with field Name and Occupation fields. And I have also created a table Details.mdb with table logindetails with two columns namely Name and Occupation.
How to add data from the excel to the table logindetails n access? I have no idea of this and need help.
Looking for answers that help me to solve problem.
|
|
|
|
|
Why do you need ASP.NET in this? You could simply go to the Details.mdb table and import the excel spreadsheet straight from access.
Or is the idea that you want people to upload their excel sheets through an ASP.NET web form? then on the back end you would transfer the data from the uploaded sheets to your access table?
|
|
|
|
|
Hi,
Iam Mahender. Can anyone Plz tell me How remove session in my web-application. My web application consists of Report viewer control. Can u tell me How to write a class that implements IReportserverconnection. I wrote Class that implements IReportserverconnection Interface , implemented all Properties and Method.( I took Guidance from .(taking Guidance 4m (http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportserverconnection2(VS.80).aspx).For the First time When Page loads, Upon Clicking a Button, a Report gets Loaded Successfully, When I select second page of Report or try to export Report to XML(Or Other Formats) I try to get exception as
“The source of the report definition has not been specified".”.
I request anyone to Plz tell me solution for this problem……….
Waiting for ur Replies……
With Regards,
S.N.P.C Mahender,
mhi
|
|
|
|
|
hi friends,
i am using ps2 scanner in my web application my problem is when i set focus on the textbox and scan a barcode the number is coming into the textbox but the page is refreshing and the number is dissapearing i am using some code in the page_load event so i have to use the code
if not(ispostback) then
-- some code
end if
if i dont use the code above its working fine but the above code is neccessary any solution for this
regards jabbar
jabbarsb
|
|
|
|
|
hi
i have generated barcode ID's and print it as well but i am not able to generate barcode preview image....
pls help.
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|
|
I have created a web form,but i have small problem,i need to retreive records from database according to ID which i given in the form in text box,i have created the StoredProcedure for that one its retreive data and i put where fieldname=@ID.
When i'm using datagrid or GridView this will not occour,but i need to do in using text box.Please help me to do this
Thank You
|
|
|
|
|
What is the question ? You need to write the SQL, which is basically select * from tbl where fieldname = id. Sounds like you did that. So, you get the id from the textbox, and pass it to the proc, set your datasource with the result, and databind.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Ok but how do i pass my text value into StoredProcedure and i'm using DataReaders.
Note-:Can i use SqlParameter for this one,if yes,how to do that.
|
|
|
|
|
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@<your param="" name="">", SqlDbType.NVarChar, 50);
param[0].Direction == ParameterDirection.InputOutput;
param[0].Value=<your value="">;
//Add the parameters to the command object
objcommand.Parameters.Add(param);
objcommand.CommandType=CommandType.StoreProcedure;
objcommand.Connection=<conn object="">;
objcommand.Command="Stored Proc Name";
objcommand.ExecuteNonQuery();
Kiran Kumar.CH
(MCP)
|
|
|
|
|
Hi,
first write one storedProc for Select data from DB with ID, Here is the Stored Procedure .
Create Procedure nameofStoredProcedure
(
@ID
)
AS
select *
from table
where id=@ID
ADO.NEt code
SqlConnection Con=new SqlConnection("userid="";databse=""; password="");
con.Open();
SqlCommand cmd=new SqlCommand("nameofStroredProcedure",con);
cmd.CommandType=CommandType.StoredProcedure;
cmd.parameter.add(new Sqlparameter("@ID",SqlDbType.Varchar(10));
cmd.parameter[0].value=textbox1.text;
SqlDataAdapter da=new SqlDataAdapter();
da.selectCommand=cmd;
da.fill(ds,"tablename");
con.Close();
i hope this will helpful for u, try onces.
WINNING IS NOT OUR DREAM,IT'S A HABIT
HAVE A NICE DAY
|
|
|
|
|
dornala wrote: Create Procedure nameofStoredProcedure
(
@ID
)
Incorrect syntax - you need to specify the datatype
dornala wrote: SqlConnection Con=new SqlConnection("userid="";databse=""; password="");
Incorrect syntax - check your quotes
dornala wrote: cmd.parameter.add(new Sqlparameter("@ID",SqlDbType.Varchar(10));
Incorrect syntax - it should be
cmd.parameter.add(new Sqlparameter("@ID",SqlDbType.VarChar,10));
|
|
|
|
|
J4amieC wrote: Incorrect syntax - it should be
cmd.parameter.add(new Sqlparameter("@ID",SqlDbType.VarChar,10));
Well actually it should be
cmd.Parameters.Add(new SqlParameter("@ID",SqlDbType.VarChar,10));
:P
Also instead of using
cmd.parameter.add(new Sqlparameter("@ID",SqlDbType.Varchar(10));<br />
cmd.parameter[0].value=textbox1.text;
as described in the previous post, it would be much easier to use:
cmd.Parameters.Add("@ID", textbox1.Text);
(AddWithValue in 2.0)
Just my daily cup of being a smartass.
|
|
|
|