|
Hi Sudhakar,
I have a suggestion. Create console application and write a code for Send Mail In C#
Like
using System.Web.Mail;
using System.Windows.Forms;
// Create a function
public SendMail()
{
MailMessage objMail = new MailMessage ();
objMail.From = "ABC@gamil.com"
objMail.To = "PQR@gmail.com;
objMail.Subject = "This is Test Mail;
objMail.BodyFormat = MailFormat.Html ;
objMail.Body = "Hi ,This is a test mail for you;
try
{
SmtpMail.Send (objMail);
}
catch (System.Web.HttpException exHttp )
{
MessageBox.Show("Exception occurred:- " + exHttp.ToString() ) ;
}
finally
{
objMail = null;
}
}
Write Body in HTML Format.A good idea is store all email who have travelled in XML and read from XML and send Mail to Client.
To schedule sending email every day .Windows schedule help you.I Mean to say you can shedule exe in windows schedular.If u need code then let me know i will send.
I hope this will you.
rajesh
|
|
|
|
|
How do u shedule exe in windows schedular.Colud u pls send code for the same.
Thanks Mini
|
|
|
|
|
To add the application to the Task Scheduler .Go to ControlPanel/ScheduledTasks.
Regards
rajesh
|
|
|
|
|
Hello Rajesh,
Is there any way we can achieve the same through coding instead of accessing the control panel
Thanks,
Mini
|
|
|
|
|
whn i press Enter Key in a textBox thn i call a particular Button_click. so how can i call give me suggestion.
Smile a lots its cost nothing so Keep smiling.
Deepak
|
|
|
|
|
Hi there,
You can set the defaultbutton for your page in the <form> tag. Whenever you press the Enter key in a web page (from you TextBox), You can call a particular Button's Click event.
Another way to fire a "click" event of LinkButton based on pressing enter in a text field. It works OK in IE and Firefox only. Here, LinkButton1 is a linkbutton .
TextBox.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + LinkButton1.UniqueID + "','')");
Regards,
Jay
|
|
|
|
|
Hello,
I tried using your code ,I have written Response.write in the click event of button
private void LinkButton1_Click(object sender, System.EventArgs e)
{
Response.Write("I have pressed Enter Key");
}
However there is nothing displayed as i press enter key in Textbox.
Thanks,
Mini
|
|
|
|
|
Hi there,
Add an additional TextBox Web control to overcome the Enter problem in IE, but hide the TextBox so your users see only one:
<form id="Form1" runat="server">
<div>
Name: <asp:TextBox runat="server" id="txtName"/>
<br />
<asp:TextBox ID="TextBox1" runat="server" style="visibility:hidden;display:none;" />
<asp:LinkButton ID="LinkButton1" runat="server" <pre>OnClick ="LinkButton1_Click">LinkButton</asp:LinkButton>
</div>
In ur Code Behid:
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
txtName.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + LinkButton1.UniqueID + "','')");<br />
<br />
}<br />
<br />
protected void LinkButton1_Click(object sender, EventArgs e)<br />
{<br />
txtName.Text = "Hai";<br />
}<br />
<br />
Now it works fine.
-- modified at 3:37 Wednesday 11th October, 2006
Regards,
Jay
|
|
|
|
|
Hi Jay,
I tried to write code as advised u,I even copy pasted the same code but it still isn't working.
What could b the problem?
Thanks,
Mini
|
|
|
|
|
Hi there,
+ I ve just given the idea only. I have just modified my previous post My Post[^]
Now you can copy and use it, it ll work fine. Try it and let me know.
Regards,
Jay
|
|
|
|
|
Thanks Jay now its working fine
Mini
|
|
|
|
|
Thats Good
Regards,
Jay
|
|
|
|
|
i have a datagrid(in c# asp.net) and i want select more than one record
e.g. i want to have a templete coulmn with checkbox and select more than one record for deleting. can any body help me?
do u know other way for multiselect?
-- modified at 3:48 Saturday 7th October, 2006
|
|
|
|
|
i want to copy the 10 rows of a datatable to another datatable
but it occur a error "This row already belongs to another table."
how can i solve it ?
MHF
|
|
|
|
|
Traverse your 10 rows and while traversing create array of objects to store information of each field and insert this object to destination table.
eg. Source Table is dsTempSearchMemo and Destination is dtSearchSeizureTemp
//For Loop
object[] objVal = {
dsTempSearchMemo.Rows[j][0],
dsTempSearchMemo.Rows[j][1],
dsTempSearchMemo.Rows[j][2],
dsTempSearchMemo.Rows[j][3],
dsTempSearchMemo.Rows[j][4],
dsTempSearchMemo.Rows[j][5],
dsTempSearchMemo.Rows[j][6],
dsTempSearchMemo.Rows[j][7],
dsTempSearchMemo.Rows[j][8],
dsTempSearchMemo.Rows[j][9],
dsTempSearchMemo.Rows[j][10],
dsTempSearchMemo.Rows[j][11],
dsTempSearchMemo.Rows[j][12],
dsTempSearchMemo.Rows[j][13],
dsTempSearchMemo.Rows[j][14],
dsTempSearchMemo.Rows[j][15]
};
dtSearchSeizureTemp.Rows.Add(objVal);
|
|
|
|
|
What you have tried is to copy the reference of the rows. What you have to do is to copy the actual rows, i.e. create new rows with the same data.
---
b { font-weight: normal; }
|
|
|
|
|
Is there any Standard to write code comments for c# ASP.NET projects?
|
|
|
|
|
abhisheks23 wrote: Is there any Standard to write code comments for c# ASP.NET projects?
Everyone has an opinion - so I'd say there are many standards for commenting code. If you want to get some ideas of codified standards (pun not intended), try google for "c# commenting standard".
|
|
|
|
|
i write asp not asp.net
don't error but data not insert into database
i don't sure i write wrong
//code//
//when input new data--> series,model,sfx check in database if have field series ,model, sfx already insert z ,y, x…..last field-->sfx//
If (Request("savetypenew") ="บันทึก" ) then
If (Request("nmtypenew1") <> "") and (Request("nmtypenew2") <> "") and (Request("nmtypenew3") <> "") then
If (len(Request("nmtypenew1")) >= 12) and (len(Request("nmtypenew2")) >= 2) and (len(Request("nmtypenew3")) >= 1) then
// create array //
Cha = array
("Z","Y","X","W","V","U","T","S","R","Q","P","O","N","M","L","K","J","I","H","G","F","E","D","C","B","A")
//check if have--> series ,model, sfx//
sql = ""
sql = sql &"select count(MMT_MOD_SFX) as AMOUNT_SFX,count(MMT_SRS_CD) as AMOUNT_SRS,count(MMT_MOD_CD) as AMOUNT_MOD"
sql = sql &" from DSP_MOD_MST"
sql = sql &" where MMT_MOD_SFX = '"&Request("nmtypenew2")&"'"
sql = sql &" and MMT_SRS_CD= '"&Request("codetypenew1")&"'"
sql = sql &" and MMT_MOD_CD = '"&Request("nmtypenew1")&"'"
set rs = conn.execute(sql)
if not rs.eof then
Totalrecord = rs("AMOUNT_SFX")
for i = 0 to Cint(Totalrecord)-1
sql = ""
sql = "Select * From DSP_MOD_MST"
sql = sql & " Where MMT_SRS_CD = '" &Request("codetypenew1")& "' and"
sql = sql & " MMT_MOD_CD = '" &Request("nmtypenew1")& "' and"
sql = sql & " MMT_MOD_SFX = '" &Request("nmtypenew2")& "' and"
sql = sql & " MMT_FR_DT <= '"&DateNow&"' "
set rs = conn.execute(sql)
do while not rs.eof
rs.movenext
loop
//if data have already then insert and add z in field MMT_MOD_SFX value Request("nmtypenew2")&Cha(i)//
sql = ""
sql = "Insert Into DSP_MOD_MST"
…….
…….
sql = sql & " MMT_MOD_SFX,"
sql = sql & " Values ('"&Request("codetypenew1")&"' , "
…….
…….
sql = sql & " '"&Request("nmtypenew2")&Cha(i)&"' , "
end if
next
else
if data haven't already then normal insert not add z
Preaw
|
|
|
|
|
hi there,
i want to make a datagrid whose first column will be stable and rest columns can scroll horizontally.plz help me.
varuni
|
|
|
|
|
|
thanx jay but i did not got any grid there which fulfils my requirement if you find it plz tell me .
regards,
deepti
|
|
|
|
|
|
hey jay,
it is exactly the same thing what i need . thanx alot
Deepti
|
|
|
|
|
I am not using Crystal Report in my report generation.
I just design the report on the web form and those datagrid will show on the web form.
Unfortunately, when the datagrid exceed more that a page, than i need to let it automatically show continue on the another web form with the same report format.
Will it be done just on the web form without using Crystal Report?
Any advice and suggestion? Thank You.;)
|
|
|
|
|