|
Hi,
r.CssClass = "sss";
Where "r" is and object of TableRow class.
I hope this wil help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
But i m using HTML table and it doesnot give CssClass property in C# file[code behind]
Do good and have good.
|
|
|
|
|
Hi,
You can do this by following.
tbl1.Rows[rowindex].Attributes["class"] = "cssclassname";
here "tbl1" is the id of your HTMLTable and "rowindex" is the index of row in that table.
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
i have an excel file, i need to print that file using asp.net...how to do it? plz any one help me...
Pradeep Reddy
|
|
|
|
|
HI,
1. Connect to excel file and get data from it.
2. Display that data in Gridview/Datagrid or in tabular format.
3. Use javascript window.print() to print the content of page.
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
thanks for the reply...
actually iam exporting data to an excel file from datagrid and storing that excel file at server side, now i want to print that excel file by clicking a server button...how to do it?
Pradeep Reddy
|
|
|
|
|
Hi,
I got you requirement but I can not see any direct way to achieve this.
The way I suggest you would be fine for you according to me.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
|
Do you mean to print it on the server or the client? on the client you would have to link to the Excel file so the browser could download it.
|
|
|
|
|
if u save the excel file in certain location then load it in the program when u click the button raise the print event.
I think it will help u
|
|
|
|
|
I am building an asp.net application in which i am sending mails to various people..But the problem is that the mail are going into spam or bulk folders.
Please provide me the right way..or give me correction in my code.. i am giving code which i am using in a console application..
MailMessage newMail = new MailMessage();
newMail.To = "abc@gmail.com"
newMail.From = "panel@rebuscode.com";
newMail.Cc = "";
newMail.Bcc = "";
newMail.BodyFormat = MailFormat.html;
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "mail.rebuscode.com");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "pane@rebuscode.com");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");
newMail.Subject = "Activate your account.";
newMail.Body = str;
SmtpMail.SmtpServer="mail.rebuscode.com";
SmtpMail.Send(newMail);
hiiiiii
|
|
|
|
|
Is your body text big size?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
|
No even if i am sending a single line it is going to spam..but I have to sent a 10 or 12 lines email
hiiiiii
|
|
|
|
|
Try with adding some more headers for the mail ?
|
|
|
|
|
To Navaneeth..
please tell me what types of headers?????
hiiiiii
|
|
|
|
|
I am not finding a soln yet plz.. help..
hiiiiii
|
|
|
|
|
I want host my demo website on the internet.Anyone knows how to Register our asp.net website along with database on any free webserver.
GIRISH
|
|
|
|
|
|
Hye guys,
I am using VS2005 with C# as a backend. The problem is that Session_End is not getting fired in normal run. While in Debug after the session time out it does work well. I writing to a file for testing when session end event fires. The code is working fine with debug mode. But under normal run the session does get time out but the event never fires...when i check the session variable it does get null. But the respective code is not executed.. I m using inproc timeout 1 min for testing. I have also tried using Session.Abandon() to manullay fire the event...even its also not working in normal run. but the session does not null. I have also tried setting the value of Application variable on Session_end to see whether it changes the existing value of Application variable..Its not working...It means Session_End is firmly not working...
from last two days i have been surfing internet to find the answer to the issue...found alot like it..but nothing similiar. So i m requesting the global guru...
your help is required.
thkx,
-- modified at 6:02 Tuesday 19th June, 2007
hello
|
|
|
|
|
There is no answer. I hate to tell you this but session end is very unreliable. I would not use code in that event to do anything of significane.
|
|
|
|
|
if anyone knows how to implement remember me feature in asp.net 1.1 then plz provide some idea of it.
|
|
|
|
|
Hi, this code can help.
This is code for 2.0 login control u replace login1.username by ur textboxcontrol.text
and by this code it will create cookie in ur local system and below code u place in ur pageload This will work fine....
CheckBox chkBox = (CheckBox)Login1.FindControl("RememberMe");
if (chkBox.Checked==true)
{
HttpCookie myCookie = new HttpCookie("myCookie"); //Instance the new cookie
Response.Cookies.Remove("myCookie"); //Remove previous cookie
Response.Cookies.Add(myCookie); //Create the new cookie
myCookie.Values.Add("user", this.Login1.UserName); //Add the username field to the cookie
DateTime deathDate = DateTime.Now.AddDays(1); //Days of life
Response.Cookies["myCookie"].Expires = deathDate; //Assign the life period
myCookie.Values.Add("pass", this.Login1.Password);
}
Getting after Cookie created
if (Request.Cookies["myCookie"] != null) //Cookie Exists??
{
HttpCookie cookie = Request.Cookies.Get("myCookie");
string user = cookie.Values["user"].ToString();
if (user != "")
{
Login1.UserName = user; //Write the username onto login username textbox
}
}
came out of hardwork
|
|
|
|
|
thanks for the code. But i have to know how to redirect to the page which comes after login page directly. when there is cookie available at page load event then how to redirect to the next page from the login page
|
|
|
|
|
Hi All,
I am trying Javascript for Validation of a new User Registration.
I want to know whether user already exits or not.
I m trying to check it on Submit button. I want to do it through Javascript.
I confused while mixing the code of javascript and ASp.net.
I created a string array of all user already exist.
now I want to check it in java script for new user's name.
I m new to javascript.
Please guideme thanks in advance,.
Asp:
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
con = new OleDbConnection();<br />
con.ConnectionString = conString;<br />
con.Open();<br />
<br />
cmdSelect = new OleDbCommand("select * from User_Information", con);<br />
da = new OleDbDataAdapter("select * from User_Information",con);<br />
ds = new DataSet();<br />
da.Fill(ds);<br />
ArrayPassword = new string[100];<br />
ArrayNames = new string[100];<br />
for (i= 0; i < ds.Tables[0].Rows.Count;i++ )<br />
{<br />
ArrayNames[i]=(ds.Tables[0].Rows[i].ItemArray[0].ToString());<br />
ArrayPassword[i]=(ds.Tables[0].Rows[i].ItemArray[1].ToString());<br />
}<br />
int j = ArrayNames.Count;<br />
string arr = ArrayNames;<br />
}
Javascript:
function Validate()<br />
{<br />
for (var i=0;i<document.forms[0].elements.length; i++) <br />
{ <br />
var val=document.forms[0].elements[i].value; <br />
if(val=="")<br />
{<br />
alert("Please Enter the "+document.forms[0].elements[i].name+ " !");<br />
document.forms[0].elements[i].focus();<br />
return false;<br />
} <br />
}<br />
document.forms[0].action="Default3.aspx";<br />
var User_name=document.forms[0].elements["Name"].value;<br />
var User_password=document.forms[0].elements["Password"].value;<br />
var i=<%=i%>;<br />
var j; <br />
var arrayNames=<%=ArrayNames%> ;
for(j=0;j<i;j++)<br />
{<br />
if(User_name==arrayNames[j])<br />
alert("User Exists");<br />
else<br />
alert("User not Exists");<br />
}<br />
<br />
<br />
}
-- modified at 7:54 Tuesday 19th June, 2007
-- modified at 8:29 Tuesday 19th June, 2007
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|