|
I use this code to write Server control in ASP.NET:
protected override void Render(HtmlTextWriter output)
{
output.AddAttribute(HtmlTextWriterAttribute.Alt,"Heyyyyyy");
output.AddAttribute(HtmlTextWriterAttribute.Href,
"http://CodeProject.com");
output.AddStyleAttribute(HtmlTextWriterStyle.FontSize,"20");
output.AddStyleAttribute(HtmlTextWriterStyle.Color,"Blue");
output.RenderBeginTag(HtmlTextWriterTag.A);
output.Write("This is a link to the Wrox web site");
output.RenderEndTag();
}
But Alt does not appear when mouse goes over the text.So how can I add two attribute?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
what does the rendered html look like?
|
|
|
|
|
Andy Smith wrote:
what does the rendered html look like?
Everything is ok,it display the link,but the TOOLTIP does not appear.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
ok, could you paste the actual final html in a reply so I could take a look?
also, remember that not all browsers support tooltips. what browser are you seeing this behavior in?
|
|
|
|
|
Thank you Andy. I change my control a little.I derive it from WebControl instead of Control and then add tooltip to ir and it solved.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Hi Folks..
Im calculating an impt variable called "querystring" in asp_page1.asp..Now if i have to transfer this value to asp_page2.asp
How do i use the response.redirect method..
I have tried response.redirect
1). "asp_page2.asp?querystring"
2). "asp_page2.asp?@querystring"
3)."asp_page2.asp?!querystring"
but none of them worked..How do i pass the value that i get at one page for my variable to the other.
Luv
Pradhip.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
I'm trying not to be too critical but this is such a basic question you really should do some research before looking for help here.
|
|
|
|
|
Using JScript:
Response.Redirect("asp_page2.asp?querystring=impt&nextval=impt2");
You could put it into the session too.
ed
Someday we'll look back on this moment and plow into a parked car.
Evan Davis
|
|
|
|
|
Searched and searched and really tried to find the answer. I've give you a hint, look at the URL that got you here.
|
|
|
|
|
Hey there,
I'm having a problem with ASP.NET cookies for an article I'm working on (for CP). I want to check if a client has a cookie called "LastVisit" and use it's Expires property to determine if the user visited a page within the last n minutes. If the cookie is not expired I want to take one action, if it is expired, I want to update the time the cookie expires and allow the user to continue normally.
I thought this would be easy, but I'm having problems. I can create the cookie and set its Expires property, but cannot seem to read it back. I'm using the HttpCookieCollection.Count property to figure out if the client has any cookies and then attempting to read the "LastVisit" cookie if Count==1. This is where the problem is: I cannot update the value of the Expires property using the following code :
HttpContext.Current.Response.Cookies.Item("LastVisit").Expires=DateTime.Now.Add(new TimeSpan(0,0,0,20));
Response.Cookies.Add(HttpContext.Current.Response.Cookies.Item("LastVisit"));
Any suggestions?
Thanks!
Erik Westermann
Author, Learn XML In A Weekend (Fall 2002)
|
|
|
|
|
Never mind ... got it
Erik Westermann
Author, Learn XML In A Weekend (Summer 2002)
|
|
|
|
|
I want to be able to send a XML file to client (meaning the client will download it). I have a problem with the HTTP header that makes IE to display the file in its page instead of opening the window to download the file.
Here is my header:
HTTP/1.0 200 OK
Content-Type: text/xml
Content-Disposition: inline; filename=myfile.xml
Content-length: 10240
I "hacked IE" by modifying the extension in something it does not recognize (.abc) and it works, the file is downloaded. However this is not what I want.
Anyone could help?
Thanks.
Best regards,
Alexandru Savescu
|
|
|
|
|
Response.ContentType = "text/xml"
Response.AddHeader "content-disposition", "attachment; filename=myfile.xml"
[Optional:]
Response.AddHeader "content-length", [Size of file in bytes]
|
|
|
|
|
Thanks, it worked!
My problem was with "content-disposition" . I used "inline" instead of "attachment"
Best regards,
Alexandru Savescu
|
|
|
|
|
hi,
Any one knows how to execute the webmethod periodically in the web services?
Thanks in advance...
|
|
|
|
|
Please can you elaborate on this?
I'm not sure what you're looking at doing...
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
I'm trying to execute the webmethod automatically without using any scheduling agent.
|
|
|
|
|
Entry,
Can you give me a bit of background on this?
Is it possible that an event will get raised and this can then call your web service?
Using some kind of NT service might be your best bet. What's your reasoning for not wanting to use one?
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
SimonS,
I'm trying to access the remote database and update the data in web server's database. For this I'm using the web service. Is it possible that the web services automatically fetch the data periodically?
|
|
|
|
|
does anyone know how to check a client computers dot net version, or even if dot net is installed?
Any help would be nice. Thanks.
Brandon
|
|
|
|
|
Check the header information it should have something like ".NET CLR" in it if .NET is installed.
|
|
|
|
|
How do i do that?
Brandon
|
|
|
|
|
I'm presuming this is for the web?
If so, here's the server variable:
Key: HTTP_USER_AGENT
Value 0: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
I have a database folder above the root on my server,
and include file in header.asp that calls the database.
I use Server.MapPath("../db/db.mdb") and it works when I am
in default.asp, but if I go deeper in the path I loose
contact with the database, does anyone have solution to
this problem?
|
|
|
|
|
If you go one level deeper in the directory structure, you'll need to use ../../db/db.mdb . The best thing to do is create a virtual directory, then always refer to it like so in the header... /vdir/data/the.mdb .
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"The height of your accomplishments will equal the depth of your convictions."
- William F. Scolavino
|
|
|
|