|
use the namespace System.Web.Mail and try ......
MailMessage mail=new MailMessage();
mail.To = "rahul@microsoft.com";//to address
mail.From = "xxx@xx.com"; //give any address
mail.Subject = "Issue Fixed"; //Subject of mail
mail.Body = "The issue has been fixed"; //Body of mail
SmtpMail.SmtpServer = "10.54.1.1";//Use this if u use proxy server for internet
SmtpMail.Send(mail);
|
|
|
|
|
hi,
im using asp.net2.0. i want to print the contents of a datagrid. is there any in built techniques.
I am usnig paging but need the entire data of the datagrid
thanks in advance
arun
|
|
|
|
|
|
hi,
thank u for ur help...it describes how to do it in a desktop application, im seeking help in the case of the asp.net
arun
|
|
|
|
|
Please guide me how use if condition in datagrid templates.
I have table in data is of threetype
status is field heading name.
status
Inkitchen
Ready
Serve
i want to show data in datagrid templete in different color in one coloum
like this
Inkitchen should be in red color
Ready should be in ble color
serve should be in black color
i using lable or link button
suhail shahab
|
|
|
|
|
Hi,
If you r using labels to display the status then you can check for the Text Property of them in the ItemDataBound event of the datagrid and change to color of lable there.
The following code may help you.
protected void dg_ItemDataBound(object sender, DatagridItemEventArgs e)
{
if(e.Item.ItemTyep == ListItemType.Item || e.Item.ItemType.AlternateItem)
{
Label lbl = (Label)(e.Item.FindControl("lblStatus");
if(lbl.Text == "Inkitchen")
lbl.ForeColor = Color.Red;
else if(lbl.Text == "Ready")
lbl.ForeColor = Color.Blue;
else if(lbl.Text == "Serve")
lbl.ForeColor = Color.Black;
}
}
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
salam sir
I am vvvvvery happy of ur guidance and sending code.u have solved my problem thanks sir.
Sohial shahab
|
|
|
|
|
Hi,
You r most welcome.
Also please dont call me sir.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Guyz,
how can Clear Browser's Cache after hitting Logout Button?
If I press back button after logout, it's going to previous page.
How can block this ?
Expecting ur replys....
thank you
Mohamed Nazeem
|
|
|
|
|
Try this..in your Page_load()
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Koushik
|
|
|
|
|
Hi,
Still it's not working. If i press back button, again it's going to previous Page. Tell me how can i block this ?
Mohamed Nazeem
Software Engineer
Bangalore
|
|
|
|
|
Hi,
Can You try this piece of code inside your Page_Load
Response.Buffer = True
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D)
Response.Expires = -1500
Response.CacheControl = "no-cache"
Sherin Iranimose
|
|
|
|
|
My question is very simple, Suppose I have two aspx pages;Page1 and Page2. When I redirect from Page1 to Page2, Page2 should load. But if I directly specify the url of Page2, it should not load. How can I do that without using any Session or Cookies.
Thanks
|
|
|
|
|
Search for the authentication in asp.net
you can do that by adding some seetings in web.cofig
<br />
<authentication mode="Forms"><br />
<forms loginUrl="Logon.aspx" name=".ASPXFORMSAUTH"><br />
</forms><br />
</authentication><br />
<br />
Its better to understand first and then use it
so take help from MSDN or google for "Forms Authentication Provider
"
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
I have an existing report I created in Crystal 10. I would like to display this in an asp.net page. It has no parameters simple report. I have also included the .rpt file into the VS project.
How do i bind the report to the report viewer?
Thanks
|
|
|
|
|
hi,
i want to import excel sheet datas into mysql table using C# code. anybody please help me with proper code.
Regards
Vijay.
|
|
|
|
|
Hi,
I am trying to kill process from task manager using "End Process" in "Processes" tab. But I tried to get the handle / PID of the process that I have selected to terminat. I would like to know how to get the handle / PID of the process that I am trying to terminate.
I tried to use TerminateProcess API to handle this. But I am not able to get handle for the killing process (e.g. winword.exe).
Anything on this will help.
Thanks
SNI
|
|
|
|
|
You can do that using if you now the process name
System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("winword");
if you have proccess ID then
System.Diagnostics.Process.GetProcessById("Provide ID");
then only have iterate through the collection
for (int index = 0; index < proc.Length; index++)
{
proc[index].Kill();
}
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Sandeep,
thanks for ur reply. But I require the solution in VC++.
Thanks
SNI
jhghjghj
|
|
|
|
|
You are in Wrong Forum dude
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
how to change gridview column width
|
|
|
|
|
Use <ItemStyle Width="100px"></ItemStyle> for your particular column.
happy coding!!!!
|
|
|
|
|
but i am binding grid at run time so how can i do that
|
|
|
|
|
Try this
dgTableCreator.HeaderRow.Cells[1].Width = System.Web.UI.WebControls.Unit.Pixel(50)
|
|
|
|
|
This needs to be done in rowdatabound event for the row - dataheader .....
|
|
|
|