|
<style type="text/css">
textarea.special {
font-family:arial;
font-size:14px;
}
textarea.special:first-line {
font-weight: bold;
}
</style>
Like rakeshs312, this method is nice
|
|
|
|
|
Hi...
I have two DIV controls in my main.aspx page. 1st DIV's ID is COMPONENT and another one is COLOR.
in main.aspx.cs, I have code to retrieve some datas from database.
foreach (DataRow drRow in dtResult.Rows)
{
Loginname = drRow["name"].ToString();
password = drRow["password"].ToString();
Response.Write(Loginname + "-" + password);
}
It is printing the values in mian window.but i want to print the value of Loginname & password into the DIV - COMPONENT.
How to do this...
Any help will be appriciated...
Thanks...G.Paulraj
|
|
|
|
|
use labels in that div and write it there
|
|
|
|
|
yes... That is one method. But here i don't know how much rows are there.
So i have to include many labels... thats why i am asking to print with out labels...G.Paulraj
|
|
|
|
|
or use a multiline textbox and write like
TextBox1.Text+= Loginname + "-" + password + "\r\n" ;
|
|
|
|
|
Yes...
Its working.... But i need to give links to each login name.
for ex,
paul - www.paul.com
raj - www.raj.com
rakesh - www.rakesh.com
Thats why i am asking to print in DIV.
Thanks...G.Paulraj
|
|
|
|
|
<div ID="display" runut="server">
foreach (DataRow drRow in dtResult.Rows)
{
Loginname = drRow["name"].ToString();
password = drRow["password"].ToString();
disp.InnerHtml += Loginname + "-" + password;
disp.InnerHtml+=("<br>");
}
|
|
|
|
|
iam checking the user is valid or not from the data base using asp.net with c#. when user is valid i should get the right symbol beside this control....what control i have to use in ajax or any
|
|
|
|
|
Read this[^]. Does it looks that hard finding out?
|
|
|
|
|
I'm using asp.net and sql server, i have table loguser fields arelike this userid varchar(50)
tdate datetime
login datetime
logout datetime
timespend datetime
i want to findout between that how many hour he spend...
Ex:
Login Time: 11:50:39
Logout Time: 12:35:03
then again when he login Login Time:12:50:03
Logout Time: 2:35:03
i want to find out today how much hours he spend
and update the field timespend in database
|
|
|
|
|
This question better belongs to General database forum.
Since the database columns are of type DateTime, you will have the date as well. Now, use DateDiff function and find the difference between login and logout time. This would give the time spent. Make sure that the dates are for both login and logout. If the dates are different, then login time to midnight would be time spent today and midnight to logout time would be the time spent the next day.
|
|
|
|
|
Hi,
I think you can record the total timespend to db when he logs out: timespend =timespend + Logout Time - Login Time,
and you should check if the login is the first login of that day, if it is, set timespend = 0.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:47am.
|
|
|
|
|
I'm using Cache file dependency in my code with CacheItemRemovedCallback function set. File dependency is on a xml file which is output of a Dataset.WriteXml. Below is the code in my CacheItemRemovedCallback method
<br />
public void RemovedCallback(String k, Object v, CacheItemRemovedReason r)<br />
{<br />
DataSet ds = new DataSet();<br />
ds.ReadXml(filePath);<br />
Cache.Insert("KeyName", ds, new CacheDependency(filePath), DateTime.Now.AddHours(1), TimeSpan.Zero, CacheItemPriority.High, OnRemove);<br />
}<br />
filePath points to the XML file which is output of ds.WriteXml.
When there is some update to the dataset I write the dataset using
ds.WriteXml(filepath, XmlWriteMode.WriteSchema);
On execution of above line, the call back methode RemovedCallback gets called. And as ds has not released the xml file yet, I get a error "...access denied as file is in use...".
Is there a way ds.WriteXml() method can release the file immediately after writing?
Else please suggest any alternate method ??
Thanx
s.a.w.
|
|
|
|
|
how to call panel1 multiple times on linkbutton click event in asp.net 2005
|
|
|
|
|
What do you mean by calling a panel?
|
|
|
|
|
use a loop and inside call the panel multiple times
|
|
|
|
|
e.Row.Attributes.Add("onclick", "javascript:rowno(( e.Row.RowIndex);");
function rowno(rowindex)
{
here we want the correct index of row after moving rows
alert(rowindex);
i=rowindex;
}
function AddRow()
{
var gridview=document.getElementById("<%= gvPracticeFacility.ClientID %>");
var gridview1=document.getElementById("<%= gvPracticesAssignedFacilities.ClientID %>");
var tr = document.createElement("tr");
var cell1 = document.createElement("td");
var celln = document.createElement("td");
var cell2 = document.createElement("td");
var cell3 = document.createElement("td");
var cell4 = document.createElement("td");
var cell5 = document.createElement("td");
var cell6 = document.createElement("td");
var cell7 = document.createElement("td");
//var i =parseInt(document.getElementById("<%= hdnfldSelectedRow.ClientID %>").value);
cell1.innerHTML = gridview.rows[i].childNodes[0].innerHTML;
cell2.innerHTML = gridview.rows[i].childNodes[1].innerHTML;
cell3.innerHTML = gridview.rows[i].childNodes[2].innerHTML;
cell4.innerHTML = gridview.rows[i].childNodes[3].innerHTML;
cell5.innerHTML = gridview.rows[i].childNodes[4].innerHTML;
cell6.innerHTML = gridview.rows[i].childNodes[5].innerHTML;
cell7.innerHTML = gridview.rows[i].childNodes[6].innerHTML;
tr.appendChild(cell1);
tr.appendChild(cell2);
tr.appendChild(cell3);
tr.appendChild(cell4);
tr.appendChild(cell5);
tr.appendChild(cell6);
tr.appendChild(cell7);
gridview1.firstChild.appendChild(tr);
gridview.deleteRow(i);
}
<input id="Button1" type="button" runat="server" value="button" onclick="AddRow();" />
this code works in internet explorer but not works in ff......
|
|
|
|
|
|
Hi...
I am having a main menu called menu1. Its sub menus are submenu1, submenu2,submenu3.
I can write event for main menu click event as
ASP code:
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" ForeColor="white" BorderStyle="None"
Height="30px" onmenuitemclick="Menu1_MenuItemClick">
and c# code is:
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
Str = "sample";
}
Now how to write click event for submenu1?
any help will be appriciated....
thanks...G.Paulraj
|
|
|
|
|
|
|
Hi Abhijith,
Thanks for your reply...
My code is as follows. Please tell me how to create menu subitem on this...
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" ForeColor="white" BorderStyle="None"
Height="30px" onmenuitemclick="Menu1_MenuItemClick">
<DynamicHoverStyle ForeColor="#000000" BackColor="Black"/>
<Items>
<asp:MenuItem Text="File" Value="File">
<asp:MenuItem Text="Open" Value="Open" ToolTip="Open File"></asp:MenuItem>
<asp:MenuItem Text="Recent Files" Value="Recent"></asp:MenuItem>
<asp:MenuItem Text="Exit" Value="Exit"></asp:MenuItem>
</asp:MenuItem>
Thanks....G.Paulraj
|
|
|
|
|
You need to close <items> tag and <asp:menu> tag First.
Try This :
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" staticdisplaylevels="5" BorderStyle="None"
onmenuitemclick="Menu1_MenuItemClick">
<Items>
<asp:MenuItem Text="File" Value="File">
<asp:MenuItem Text="Open" Value="Open" ToolTip="Open File"></asp:MenuItem>
<asp:MenuItem Text="Recent Files" Value="Recent"></asp:MenuItem>
<asp:MenuItem Text="Exit" Value="Exit"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:menu>
And In Code Behind :
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
Response.Write(e.Item.Text);
}
Here you will find on click of every menu items / subitems , Menu Text getting write on page.
Hope this will help you !
|
|
|
|
|
Ya... Its working fine...
Thanks...G.Paulraj
|
|
|
|
|
Welcome
|
|
|
|