please check the code for aspx page below :-
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:image id="Image1" runat="server" tooltip="This is image tooltip" />
</div>
</form>
</body>
</html>
and the code behind page look like as below :-
protected void Page_Load(object sender, EventArgs e)
{
string str = Image1.ToolTip;
Response.Write(str);
}
It as straight as assigning any text to string at runtime.