MrTV
asked on
c# auto fill on webpage
how can I fill "MyUserName" on
<td width="18%" class="more"><div align="right">¿¿¿¿¿¿ </div></td>
<td width="82%"><font color="#FFFFFF" face="MS Sans Serif, Tahoma, sans-serif">
<input type=text name="QTitle" size=51 maxlength=100 class=violet>
</font></td>
the full page is
http://www.kumnunrdnoppakhun.go.th/webboard/new.php
<td width="18%" class="more"><div align="right">¿¿¿¿¿¿ </div></td>
<td width="82%"><font color="#FFFFFF" face="MS Sans Serif, Tahoma, sans-serif">
<input type=text name="QTitle" size=51 maxlength=100 class=violet>
</font></td>
the full page is
http://www.kumnunrdnoppakhun.go.th/webboard/new.php
private void webBrowser2_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
}
private void LoadProfileInformation()
{
DataSet dsNew = new DataSet();
//Some code to fetch information if you store it in a DB else you can put in static info if you may want. //so you will nto need the dataset.
QTitle.Text = "MyUserName";
}
}
}
ASKER
Hi
I use webcontrol on c# in windows application please suggest
I use webcontrol on c# in windows application please suggest
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can't automatically reference standard HTML tags from your ASP.Net server-side code. To make a HTML control visible to your code-behind you need to add the following 2 attributes to your input control (this same rule applies to most HTML controls running under ASP.Net)
Open in new window
andOpen in new window
(obviously this id can be any unique name).i.e. change your input tag to:
Open in new window
You can then set the value from your code-behind as:
Open in new window
Hope that helps.
P.S. Alternatively you can use ASP Web controls which default these attributes.