|
declare correct_code;
while get_the_correct_code
begin
correct_code=search_goolge();
end
if check_code_serve_ur_purpose(correct_code)
begin
learn_it();
apply_it();
end
Thomas
|
|
|
|
|
I am trying to use a popup screen to populate some of the
values of user defined object, to be clear i want to set
obj.value1 to obj.value5 in parent form
and obj.value6 to obj.value10 in the popup window
session data is stored in state server
but when i open the popup window the values set in parent window are not present
can any one suggest me a better way to acheive this functionality
Thanks in advance
Krishna
|
|
|
|
|
if you popup window in client side use javascript or vbscript, you cann't get the object value in session for the parent page. you must post back the page and get the object value in session.
|
|
|
|
|
Thanks for the response,Can you please explain with a simple example
currently am using javascript to open the popup window
Krishna
|
|
|
|
|
I'm using the following code to print a report from a reportserver to the default printer on a remote client machine. It works when I print from the development IDE on the server but when I run it thru IE on the remote client machine, the report is not printed. Any ideas as to where I may be going wrong?
Thanks in advance,
RickyZX
*********************************************
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
Dim URL As String = "http://MyServer/ReportServer?/reportfolder/MyReport&Case=123456789&rs%3aCommand=Render&rs%3AFormat=PDF"
Const LocalFile As String = "C:\PRINT_TEMP.PDF"
DownloadWebFile(URL, LocalFile)
PrintAdobePDF(LocalFile)
End Sub
Sub DownloadWebFile(ByVal URL As String, ByVal fName As String) As String
Dim myWebClient As New WebClient
myWebClient.Credentials = CredentialCache.DefaultNetworkCredentials()
myWebClient.DownloadFile(URL, fName)
End Sub
Sub PrintAdobePDF(ByVal Filename As String)
Dim myProcess As New Diagnostics.Process
myProcess.StartInfo.FileName = Filename
myProcess.StartInfo.WorkingDirectory = New FileInfo(Filename).DirectoryName
myProcess.StartInfo.CreateNoWindow = True
myProcess.StartInfo.Verb = "Print"
myProcess.Start()
myProcess.Dispose()
End Sub
*********************************************
RickyZX
|
|
|
|
|
Dear all...
I have a problem that faces me when I delete a record,
assume that I have a dropdownlist that reads from a table, I did a function to delete the selected record when delete button is submitted and it is redirected to the same form, it deletes the selected record from the database, but it is still viewed in the dropdownlist...
How can I deal with this ?
And thanx alot for your help
Nour Abdel-Salam
|
|
|
|
|
One way would be to refresh the datasource with the new values from the database.
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.
|
|
|
|
|
Another would be to use the key and remove the listitem from the dropdownlist.
|
|
|
|
|
Dear ...
why do you mean of "refresh the datasource with the new values from the database", and how?
Regards
|
|
|
|
|
nour123 wrote: How can I deal with this ?
A better question would be "why?" That way you will understand how it works and you will be able to figure out how to deal with it on your own. It is part of the "give a man a fish and you feed him for a day, teach a man to fish and you feed him for a lifetime" principle.
The reason why is that the contents of the drop down will be stored in the viewstate of the page. So, on postback it automatically populates the drop down list with the same values it had before.
|
|
|
|
|
Colin Angus Mackay wrote: It is part of the "give a man a fish and you feed him for a day, teach a man to fish and you feed him for a lifetime" principle
Another version of this includes "teach a man to fish and you get endless stories of the one that got away."
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.
|
|
|
|
|
Fantastic answer...hehehe
Please don't ever reply to any of my requests, why it is a forum?
To write paragraphs like sheckspeer?
anyway, Thanks
|
|
|
|
|
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);
|
|
|
|