CResponse::title

The CResponse::title function sets the title of an HTML page.

void title(
chchar * title // points to a string containing the title of the HTML page.
);



Return Type

None.


Parameters

title
A string containing title of the HTML page.


Remarks

This function sets the title by adding <head> and <title> tags into an HTML page. If content type is text/html, tags of <html> and <body bgcolor="#FFFFFF"> are added by this function as well, the CResponse::end function will add </body> and </html> tags at the end of this HTML page correspondingly.

It is equivalent to the code below:
void CResponse::title(char* titleName)
{
   printf("<html>\n");
   if (titleName != NULL)
       printf("<head> <title> %s </title></head>\n", titleName);
    printf("<body bgcolor=\"#FFFFFF\">\n");
}


Differences Between Ch-CGI and Ch-ASP

This member function works in Ch-CGI. It is not valid in Ch-ASP.


See Also

CResponse, CResponse::begin, CResponse::end

Example