|
I already tried it.
But its because the button event firest after page load and the Register script are created at the end of PageLoad.
I could however have a hidden field and have a javascript function that evaluates that hidden field and pops the alert box in the onLoad event of the body. But thats kinda ugly.
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Ista wrote: But its because the button event firest after page load and the Register script are created at the end of PageLoad.
What script is created at the end of PageLoad? How does that affect the popup script?
---
b { font-weight: normal; }
|
|
|
|
|
I think were on different wavelengths here.
I need to create a javascript in the button event.
The ClientManager.RegisterClientScript is added at the end of PageLoad.
So, unless theres another Register event that the button can fire to create my script, I have to use a hack with the hidden values.
Although I'm learning about client script callbacks and maybe that will solve it.
Thanks for trying to help,
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Ista wrote: I think were on different wavelengths here.
True. You have made an assumption on how RegisterClientScript works that makes you think that you can't use it.
Ista wrote: So, unless theres another Register event that the button can fire to create my script, I have to use a hack with the hidden values.
RegisterClientScript is not an event, it's a method. There is no reason you can't use it more than once in a page.
Actually, if you look at the reference you see that the first two parameters serves no other purpose than handling the situation where you call it repetedly from different parts of the code, that even may be unaware of each other.
---
b { font-weight: normal; }
|
|
|
|
|
Are popup windows a bad design these days with all the popup blockers etc?
I have a really good fit for a popup window in an asp.net business application I'm designing but I'm concerned that the popup window will be in the long run trouble for our less technically savvy potential users.
Is there a do's and don'ts of popup windows anywhere for the modern age?
|
|
|
|
|
I don't remember the code, but IE fires a "pop-up closed" event when it's blocked which you can use to reload the pop-up if it's THAT important to show the pop-up.
As for me, I'd rather steer away from pop-ups. A large part of the public still believe you can get viruses from a pop-up and therefore you'll scare potentioal customers.
If it's indispensable though, do a search on google regarding what I said above Just don't put 'very important info' in the popup as this can be blocked and will result in a diminished experience for the customer. If all else fails, you can always provide a 'Click here to open popup and be my guest' link on the main page.
My two cents anyway...
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
Thank you, just the sort of opinion I'm after.
My other concern is that people might be using hand held devices with browsers and from what I've seen a popup might be oversized whereas a standard page may layout more usefully on such a device.
|
|
|
|
|
|
Nice links, thank you, lot's of good info there!
Cheers!
|
|
|
|
|
Just a quick idea, but you should be able to show a DIV layer on the click.
If you design it correctly it can serve as a popup...
good luck.
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
OK, im working on an assignment and I'm running, running, running my web application like crazy. Mod a line, run... mod another 3 lines, run.
Suddenly I realize that my dataset (being filled from a mysql database on load of the ASP.NET web application) seems to be caching my data. I don't know if that's what it's actually doing but sometimes I'm stuck with old data until I wait sometime and re-run.
Now as much as MS thought this was a great idea, it's really bugging me. My friend told me to kill the aspnet_wp (worker process i suppose) when it happens and it works. BUT:
my problem is this: since this is an assignment I need to submit and leave with my lecturer and because my diploma is hanging on this assignment I need to find a fail-safe work-around to this. Don't want it happening to my (less then bright, let me tell ya this) lecturer and get a big, old FAIL!
So I thought... great... I'll kill it programmatically on Session_End in the <font color="blue">Global.asax</font> file but it ain't working. This is my code:
foreach (Process p in Process.GetProcesses())<br />
{<br />
if (p.ProcessName.Equals("msnmsgr.exe"))<br />
{<br />
p.Kill();<br />
break;<br />
}<br />
}
Thanks a lot... you'll save my life :/
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
-- modified at 12:20 Friday 12th May, 2006
Just so you know, I've been trying to close msnmsgr.exe first to be sure it works coz aspnet_wp restarts as soon as it's killed. This way I'll know it's working and then I'll just replace msnmsgr with aspnet_wp
|
|
|
|
|
I'm no expert on this subject, but in general I recommend you find out the root cause of the problem because what you are attempting sounds like a work around to me and the lecturer will likely have a highly trained nose for sniffing out workarounds and lowering the grade accordingly.
|
|
|
|
|
You can write a simple user guide which tells your lecturer to kill the aspnet process everytime he gets stuck with your application .
To be honest, killing the aspnet process is not the right way you go. Here, you have a problem with old cached data, and from your view the application should be running properly even when the data updated. If this is the case, then there are a couple of options which you may try:
+ The ASP.NET 2.0 introduces a cool object named SqlDependency [^] which notifies you to refresh the cache when the original data in the database changes. However, this may cause you another issue as this object requires SQL 2005, but I guess you can use the trial edition.
+ You can set the expiration time for the cache item to a short value.
+ If the cached data is likely to be updated often, you may not need to cache data.
|
|
|
|
|
Thanks for the replies. I'll check into the
+ You can set the expiration time for the cache item to a short value.
+ If the cached data is likely to be updated often, you may not need to cache data.
ideas first. If they don't click, I'll just notify my lecturer =)
thanks p33pz
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
Hi
I am having a web application with some textboxes, dropdownlists and two buttons. one button is save and one button is submit.
i need the following functionality for save button:
suppose if you fill the fields with partially info(assume you don't have some info in that specific time) and click the save button. The save button will save the data but not update the database. In next time login, the data which you filled previously, should display the corresponding fields.
Need answer or URL if you know......
Thanks,
Bhasker P
|
|
|
|
|
i want write a number and with click a button convert it for text
for example:
123 convert to: onehundered twenty two
can any body help me???????????
|
|
|
|
|
Go through this.
http://4umi.com/web/javascript/numbertoword.htm
Hope this will solve your problem.
Best Regards,
Apurva Kaushal
|
|
|
|
|
How can I move my Web project from my local computer to our internal Server so our employees can asscess the Web application without any errors. I tried moving all the files and I get errors. Our server is Windows 2003 SBS with Frame work 1.1 and 2.0.
Error messeage is "Server Application Unavailable".
Thank you.
Bustum
-- modified at 11:23 Friday 12th May, 2006
|
|
|
|
|
It should be as simple as copyin gthe dir, setting it up as a VDir in IIS, and making sure that everything is present in terms of components and assemblies.
I usually get that error when a connection string hasn't been updated to reflect the new database...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
How to disable horizontal scrollbar in Firefox browser for textbox with multiline property
|
|
|
|
|
Sir,
I want to know when multiple users logged in ,what are the name of the users .When they logged in and when they logged out.
Can somebody please send me any link.
Thank You.
Amaneet Brar.
|
|
|
|
|
i use the Forms mode for authentication on the web.config file.
Then once the user logs in i can check to see what that users log in name is by calling User.Identity.Name;
hope this helps
Scott
|
|
|
|
|
Sir,
Can you please send me any link project.that describes some more features
including the logon feature.
Thank You
Amaneet
|
|
|
|
|
google. put in
asp.net user authentication
first link that came up for me was http://www.15seconds.com/issue/020220.htm
|
|
|
|
|
Sir,
I am diplaying images in datalist now the problem is the portrait images are also looking like landscape images this is due to the reason that i have fixed the size of images like width and height.(If i don't fix the size the images comes in their original size i.e takes one and a half page).Can somebody please send me any link that differentiate the landscape pictures from portrait pictures while displaying in the datalist in image control.
Thanks
|
|
|
|