|
When you add the button to the container (panel), it will be removed from its current parent (that I guess is the custom control). When the postback occurs, the dynamic button does not exist as the child control of the panel, and you may notice this thing.
|
|
|
|
|
the approach i have taken, until i can find a better solution is to ...
render all other controls not requiring events, using Panel Controls, and explicitly render the buttons using the writer, and not contain them within another Control.
this works fine, although not perfect for my needs.
thank you *again* for all your help
kind regards,
g00fy
|
|
|
|
|
hello
i'm making a project in asp.met with vb.
I have a .htm file in the my application folder. what I want, I want to read the htm file and want to write some text in this .htm file ona particlualar position.
exactly i have to write the text before the tag by through script.
any body can help me.
|
|
|
|
|
Hi,
Is that .htm file contains simple text are with animations? If text means it's easy to read it using file streame and write your text in that in an specific position
bye
|
|
|
|
|
if the source file is never changed, i.e you always save as a different file and use the source file as a template, this may help.
add a comment into the HTML file, like:
then just do a string replace like so.
string str = System.IO.File.ReadAllText(filepath);
str.Replace("<!-- {PLACEHOLDER} -->", "some text to put into the HTML file");
System.IO.File.WriteAllText(savepath);
otherwise if the file is always changing and you are always needing to insert and not remove then this may help
string str = System.IO.File.ReadAllText(filepath);
str.Replace("</body>", "<script type=\"text/javascript\">alert('script inserted');</script></body>");
System.IO.File.WriteAllText(savepath);
otherwise you will need to use regular expressions i think, unless you can supply more information
hope that helps
g00fy
|
|
|
|
|
hi
thanx for the valuable reply..actually i want to use google analystic into the site.
what is exactly i want to do when any user create his site then this javascript code
"
_uacct="UA-xxxx-x";
urchinTracker();
"
I have to Insert this code before tag.
You suggested that i have place a comment into the Template file.this is ok and will work but measure problem is that when user will upload his template then there will be no Comment then how will get this comment.any suggestion.
|
|
|
|
|
it appears this is a once off insertion, so you can use my last suggestion to replcae the tag and prefix it with your code.
regards,
g00fy
|
|
|
|
|
when i'm trying to ur code then its giving error that ReadAlltext is not a
member of
"System.IO.File"
what should i do.
|
|
|
|
|
it would seem you are using .NET 1.1 and you need to write some more LOC,
try something like this, off the top of my head, haven't used .NET 1.1 for a while now
string str = string.Empty;
using (System.IO.TextReader reader = new System.IO.StreamReader(System.IO.File.Open(path, System.IO.FileMode.Open, System.IO.FileAccess.Read)))
{
str = reader.ReadToEnd();
reader.Close();
}
str = str.Replace("</body>", "<script>// blah blah</script></body>");
using (System.IO.TextWriter writer = new System.IO.StreamWriter(System.IO.File.Create(path)))
{
writer.Write(str);
writer.Flush();
writer.Close();
}
|
|
|
|
|
hello,
thanx a lot..
its working now.
thanx for taking pain for me.
happy progarmming.
|
|
|
|
|
any time
glad to help
|
|
|
|
|
Hello
I'm stucking in another problem, I have to measure the bandwidth of the site.
is there any function by which i can measure the bandwidth
usage by user.
i found that there are some tools which provide this Facility.
but how can i achieve by myself thorugh coding.
plz guide me
any suggestion.
thanx
|
|
|
|
|
Hey,
I question regarding downloading a file. From a page in my application i click a link that opens a popup window - this new window performs some logic on the server side and streams a file to the client, upon which they get the file download dialog (open, save, cancel).
If they choose to open the file, depending on the file type, it may open in a separate window, which is fine, but i then want to close the empty popup window that i am left with.
Anyone any idea how to do this?
|
|
|
|
|
cannot be done, sorry.
client doesn't have handle to the open/save/run dialog so you can't pick up on an event, and the opening window doesn't have a reference of the open window (which launched open/run/save) to close it.
regs,
g00fy
|
|
|
|
|
Hello ,
I am a asp.net c# programmer i am in a problem ie,in my site i get a bulk data from another site it contains online image url also but i have to download that image into my site for i want to resize..can anybody help me to solve this this.ie, how to download an image from one site in dynamic that's it...i am waiting for your reply...alex.
|
|
|
|
|
i need a clearer explanation but can you 'asynchronously' download the image in an iframe, this way your page loads and the iframe can load at its own pace.
i assume you need to get the image url from the bulk data so you can dynamically set the src of the iframe in codebehind to a page on your site and pass that page the images url, then the page loads the image into the iframe
... viola
is this what you mean ?
regards,
g00fy
|
|
|
|
|
Hi
How do I get a webservice to post a message in the EventLog?
Regards
|
|
|
|
|
|
I have a gridview to show data. i need to remove/invisible the vertical line inside the gridview,so the vertical line look like not exist.
I need to set it at stylesheet, so , how i code it at css file ?
Anybody know ? thanks.
Best regards,
Chee ken
|
|
|
|
|
set GridLines property to horizontal or none, then set borders how you please.
hope that helps
g00fy
|
|
|
|
|
Hey guys,
I'm writing an asp.net 3-tier application that uses data-source component, business-logic component and application component.
The BL and the DS components are designed as singleton classes, so when clients request for data, they get the same BL object (and DS object) so IIS won't create multiply BLs/DS's objects.
I want to know how the IIS manages the requests.
if IIS will create a thread for each client there will be a race condition between those threads that want to run the same method.
if so, I probably create the methods as "synchronized code region" which means that only one thread can enters a method at a time...
do I need to get into it at all?...
Thanks.
Roy.
p.s - I using visual studio.net 2003 and IIS 5.1
|
|
|
|
|
Roy
Dont have your answer but maybe this help.
When using IIS and webservice then the IIS "fire" a new thread for each SOAP function call.
|
|
|
|
|
Hey BLOEDHOND,
Tanks for replying.
This is a good thing but I don't use XML web service in my application..
Thank again.
|
|
|
|
|
the answer is very simple.. I just don't need to get into it
the IIS is smart enought to handle this problem.
thank again all
Roy.
|
|
|
|
|
Hi there,
Just stumbles across this post. I can't see how IIS is *smart enough* to do this as the accessor to get a Singleton is static, so everyone has a chance to get it at the same time as you mention, the race condition.
Therefore each client will obtain the singleton and have it within their HttpContext of their Session, and be able to access the same singleton concurrently.
Won't they ??
regards,
g00fy
|
|
|
|