|
Any warnings or error messages shown?
|
|
|
|
|
Actually it does not show any error nor does its show output.
but when i run through IDE its show output.
what is the problem?
regards
imran khan
|
|
|
|
|
I am sending bulk emails using asp.net with vb.net. Is it possible to keep track of sent mails? My problem is:
- I want to get all mails in my sent items folder (of my mail account)
- If mail is not delievered, I want to get a list of mails which are sent successfully and which mails undelievered due to any problem like unknown email id ?
- Any suggestion to use xp_sendmail stored proc using SQL Server 2000 to handle this situation?
Thanks.
|
|
|
|
|
I used a method which is not bullet proof, but gives you an idea of the sent mails. There are loads of but's and if's involved though...
I sent HTML mails including a picture of 1 by 1 pixel. The image comes from a dynamic webpage. The source of my html mail contains the image tag
<br />
<img src="http://www.server.com/mailimage.aspx?mailingid=12345&contactid=12345"><br />
As said, mailimage.aspx returns an image which allows you to hide the image. Mailingid and Contact id allowed me to set some database flags.
Also, when my html mail contained links, for example
<br />
[a href="http://www.google.com"]google[/a]<br />
I changed the link to a diffrent link
<br />
[a href="http://www.server.com/redirect.aspx?link=http://www.google.com&mailingid=12345&contactid=12345"]google[/a]<br />
which also allowed me to keep track of clicked links. However as you can understand, this technique is far from bullet proof and only works when the receipient accepts html mail, and allows you to display pictures. The links still work, which enables you to get some feedback.
|
|
|
|
|
hi any one can tell how to use menu bars in asp.net,
using html menubars i did it in asp.net,
But i am not satisfy with that,
anyone can tell,easy way for that,
Magesh
|
|
|
|
|
VS 2005 have inbuild Menu Control use it Might be helpfull
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
hi i have only 2003.....,based upon if any option is there tell me........
Regards And Friendly,
Magesh
|
|
|
|
|
U can use a third party control for menu called 'skmMenu'.
Google it and get it...its really good.
|
|
|
|
|
|
am using this ->
value='<%# DataBinder.Eval(Container,"DataItem.total")%>'
its working if there is already digits after decimal but if no digit is there then I wish to display .00 with the result.
How to do it?
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
Add the following attribute to your bound column
<br />
DataFormatString="{0:F}"<br />
it'll work
~Vsree
|
|
|
|
|
Use statment like -
<%#DataBinder.Eval(Container.DataItem, "EnteredDate", "{0:dd.MMM.yyyy hh:mm tt}")%>
I have used it to format DATE.
u can use {0:F} or what ever u need.
"If our Mind can, the Program can !!"
|
|
|
|
|
i have added <%@ PreviousPageType VirtualPath="~/Admin/NewsUpload.aspx"%> on the target page. I am going to the target page from NewsUpload.aspx
But on the target page
Page.PreviousPage is giving null. WHY ????
do anyone help me out with some example
thanks in advance.
|
|
|
|
|
try this
void Page_Load(object sender, EventArgs e)
{
if (PreviousPage == null)
{
Response.Write("Invoke me only through cross-page posting.");
Response.End();
return;
}
// Retrieves the data textbox
TextBox txt = (TextBox) PreviousPage.FindControl("Data");
Response.Write("You passed: " + txt.Text);
}
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
if (PreviousPage == null)
it goes into this loop .but when i give PreviousPage and a dot it gives its
public property since on the previous page i had done
public int CurrentCity
{
get
{
return GridNews.PageIndex ;
}
}
|
|
|
|
|
call the function in script tag in aspx page
void Page_Load(object sender, EventArgs e)
{
if (PreviousPage == null)
{
Response.Write("Invoke me only through cross-page posting.");
Response.End();
return;
}
// Retrieves the data textbox
TextBox txt = (TextBox) PreviousPage.FindControl("Data");
Response.Write("<b>You passed:</b> " + txt.Text);
}
i have done it Yesturady only remove the <@ PreviousPageTag
tag and try Not getting Why it is showing the null confused:
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
it goes in the loop
if (PreviousPage == null)
{
Response.Write("Invoke me only through cross-page posting.");
Response.End();
return;
}
|
|
|
|
|
tell my what are you doing? are you adding any extra thing as i said remove the PreviousTag Tag from aspx as i can't predict the previous page it can be anyone (maximum cases you can't predict previous page)
Considering you are using VS 2005 can you post your code that you have written in pageload
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
|
Only a dataset can have many tables.
For filling a dataset,
<br />
adapterObj.Fill(dataset1,"Tblname1");<br />
adapterObj.Fill(dataset2,"Tblname2"); <br />
<br />
to access a table,
<br />
Datatable dt1 = dataset1.Tables["Tblname1"];<br />
string str = dt1.Rows[0]["Column1"].ToString().Trim();<br />
Can u please tell your exact requirement?
|
|
|
|
|
<code>SqlCommand cmdDesign = new SqlCommand();
cmdDesign.Connection = Cn;
cmdDesign.CommandType = CommandType.StoredProcedure;
cmdDesign.CommandText = "EIS_spGetEmployeeCategory";
cmdDesign.Parameters.Add("@User_Id", SqlDbType.Int).Value = intUserId;
SqlDataAdapter daDesign = new SqlDataAdapter();
daDesign.SelectCommand = cmdDesign;
daDesign.Fill(ds, "EmpCat");
SqlCommand cmdEdu = new SqlCommand();
cmdEdu.Connection = Cn;
cmdEdu.CommandType = CommandType.StoredProcedure;
cmdEdu.CommandText = "EIS_spGetEmployeeBasicQualificationList";
cmdEdu.Parameters.Add("@Id", SqlDbType.Int).Value = intUserId;
SqlDataAdapter daEdu = new SqlDataAdapter();
daEdu.SelectCommand = cmdEdu;
daEdu.Fill(ds, "EmpEdu");
string fileName = Server.MapPath(".");
fileName = fileName + "\\Templates\\Resume_Template2.xml";
XmlDocument xmlTemplateDoc = new XmlDocument();
xmlTemplateDoc.Load(fileName);
CExWordMLFiller wfiller = new CExWordMLFiller(ds, xmlTemplateDoc.OuterXml);
wfiller.Transform();
string copyFileName = Path.GetTempFileName() + ".xml";
wfiller.WordMLDocument.Save(copyFileName);
Response.Clear();
Response.ContentType = "application/msword";
Response.Charset = "";
Response.AddHeader("Content-disposition", "inline: filename=" + copyFileName + "");
Response.WriteFile(copyFileName);
Response.Flush();
Response.Close();
</code>
This was the code i used earlier.But i want to split this code so that each dataset in separate functions in class.There comes the trouble. CExWordMLFiller wfiller = new CExWordMLFiller(ds, xmlTemplateDoc.OuterXml);
This 'ds' comprises all datasets..
This is the new code..:
<code> public DataSet GetEmployeeCategory (int userId)
{
DataView dvTemplate = null;
int templateId=0;
string SP = DBObjectName.spGetEmployeeCategory;
Hashtable htParameters = new Hashtable();
htParameters.Add("@User_Id",MISUtility.CheckNull(templateId));
DataSet EmpCat = new DataSet();
try
{
OpenConnection();
dvTemplate = Connection.ExecuteProcedure(SP,htParameters);
DataTable dtTmp = dvTemplate.Table;
EmpCat.Tables.Add(dtTmp);
}
catch(Exception e)
{
throw new MISException("AdvancedReport.GetEmployeeCategory() failed",e);
}
finally
{
CloseConnection();
}
return EmpCat;
}
public DataSet GetEmployeeBasicQualification(int userId)
{
DataView dvTemplate = null;
int templateId=0;
string SP = DBObjectName.spGetEmployeeBasicQualificationList;
Hashtable htParameters = new Hashtable();
htParameters.Add("@User_Id",MISUtility.CheckNull(templateId));
DataSet EmpEdu = new DataSet();
try
{
OpenConnection();
dvTemplate = Connection.ExecuteProcedure(SP,htParameters);
DataTable dtTmp = dvTemplate.Table;
EmpEdu.Tables.Add(dtTmp);
}
catch(Exception e)
{
throw new MISException("AdvancedReport.GetEmployeeBasicQualification() failed",e);
}
finally
{
CloseConnection();
}
return EmpEdu;
}
</code>
<code>private void GetResumeMergeFields()
{
try
{
ResumeTemplate obj = new ResumeTemplate();
//DataSet EmpCat = obj.GetEmployeeCategory();
string fileName = Server.MapPath(".");
fileName = fileName + "\\Templates\\Resume_Template2.xml";
XmlDocument xmlTemplateDoc = new XmlDocument();
xmlTemplateDoc.Load(fileName);
CExWordMLFiller wfiller = new CExWordMLFiller(ds, xmlTemplateDoc.OuterXml);
wfiller.Transform();
string copyFileName = Path.GetTempFileName() + ".xml";
wfiller.WordMLDocument.Save(copyFileName);
Response.Clear();
Response.ContentType = "application/msword";
Response.Charset = "";
Response.AddHeader("Content-disposition", "inline: filename=" + copyFileName + "");
Response.WriteFile(copyFileName);
Response.Flush();
Response.Close();
}
catch(Exception ex)
{
throw new MISLogException(this.MISRecordFetchErrorMessage,ex);
}
}</code>
ds in GetResumeMergeFields() in getting error...
Please help...
|
|
|
|
|
A datatable will have only one table but a dataset can have multiple tables.
If you have data required from two tables then join those multiple tables and assign to a dataset then further to a datatable.
I guess....
Gautham
|
|
|
|
|
Can u please explain how can i write the code for that...
Thankin u in anticipation.![Big Grin | :-D](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_biggrin.gif)
|
|
|
|
|
hi friends
i have on ascx user control
on user control i have three textboxes
which are invisible
i have one button on ascx
when i press this button
these textboxes will get visible
when it gets visible i want to set focus on
one of these textbox
so i write one javascript
and form load
i write
btnAdd.Attributes.Add("OnClick","Setfocus()")
but in this case js code will execute first
text boxes are invisible
and i am not able to refer these textboxes in js
so i am not able to set focus
how can i solve this or any other way to solve this issue
pls help
thanks
|
|
|
|
|
btnAdd.Attributes.Add("OnClick","Setfocus()") ?
Are you writing it in ascx page load ?
that is important
In javascript only make them visible before seting focus
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|