|
I see. I'm sorry but I'm very new to ASP.NET, and I can't seem to understand what you meant by a service with SQLProcName and SQLParameter. I have scanned a few tutorials and few ebooks but nothing seems to lighten me up. And also, I tried to create a webservice, added a windows form, and I tried to test run it but I get an error message like this:
"Windows start service failure:
----------------------------
Cannot start service from the command line or debugger.A windows service must first be installed
(using installutil.exe) and then started with the server explorer, Windows services Administrative
tool or the NET START command. "
--------------------------------
|
|
|
|
|
i want to display my images in datalist.
i save my images path in access database(like this Product\hotel\product1.gif)
my images are in a speial folder which under the App_Data.
how can i connect datalist-images directory-image? i connected to database with accessdatasource1.
|
|
|
|
|
U need to use an Image Control in DataList(Edit Template)
and set the Image Control URL in ItemDataBound event of DataList
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
Image I1 = (Image)(e.Item.FindControl("Imagex"));
I1.ImageUrl = dth.Rows[e.Item.ItemIndex]["ImageURL"].ToString();
}
"dth" is the DataTable which I am using as DataSource for DataList
The URL should be "App_Data/product1.gif",to retrieve the image .
As in ur case if URL is stored as eg:Product\hotel\product1.gif
Then you need to convert it to "App_Data/product1.gif",
using string manipulation .
|
|
|
|
|
i Have given image tag inside td in Body but not displaying message. but if i tried for inline attachment with System.Net.Mail.LinkedResource then getting as image embed but while embeding like this mails are getting late to send
follow is the code part i am using
Body = "<div>
Body += "<table cellpadding="0" cellspacing="0" align="center">";
Body += "<tr valign="top">";
Body += "<td align="center">
<div><img src="images/S.JPG" alt="" /></div></td>";
Body += "</tr>";
Body += "</table>";
Body += "";
Body += "";
Body += "</div>";
|
|
|
|
|
I can only see fractions of your code. Use the "Ignore HTML" option when you are posting markup code.
sathimailin1 wrote: i Have given image tag inside td in Body but not displaying message.
Is it the mail message that is not displayed, or the contents of the message that is not displayed? Where is it not displayed?
sathimailin1 wrote: while embeding like this mails are getting late to send
How are you embedding the image? What do you mean by "late to send"?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
<pre>
string Body;
AlternateView htmlIV;
SqlConnection _oSqlconn;
SqlCommand _oSqlCmd;
SqlDataAdapter _oAdapt = new SqlDataAdapter();
DataTable DT;
DT = new DataTable();
string Sqlstr;
_oSqlconn = new SqlConnection(ConfigurationManager.AppSettings["Test"]);
_oSqlconn.Open();
Sqlstr = "select cEmail_id1 from Master_Contacts";
_oSqlCmd = new SqlCommand(Sqlstr, _oSqlconn);
_oSqlCmd.CommandType = CommandType.Text;
_oAdapt.SelectCommand = _oSqlCmd;
_oAdapt.Fill(DT);
_oSqlconn.Close();
Body = "<table cellpadding='0' cellspacing='0' bgcolor='#c1c1c1' align='center' width='100%' border='0'>";
Body += "<td align='center'>";
Body += "<table cellpadding='0' cellspacing='0' align='center' width='600' height='703' border='0'>";
Body += "<tr>";
Body += "<td align='center'><img alt='' hspace=0 src='cid:imageId' align=middle border=0 ></td>";
Body += "</tr>";
Body += "</table>";
Body += "</td>";
Body += "</tr>";
Body += "</table>";
htmlIV = System.Net.Mail.AlternateView.CreateAlternateViewFromString(Body, null, "text/html");
System.Net.Mail.LinkedResource imagelink = new System.Net.Mail.LinkedResource(Server.MapPath(".") + "\\images\\S.jpg", "image/jpeg");
imagelink.ContentId = "imageId";
imagelink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
htmlIV.LinkedResources.Add(imagelink);
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage("xyc2@yahoo.com", Convert.ToString(DT.Rows[i]["cEmail_id1"]), ConfigurationManager.AppSettings["Subj"], Body);
mail.AlternateViews.Add(htmlIV);
System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential(ConfigurationManager.AppSettings["MailID"], ConfigurationManager.AppSettings["Pass"]);
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 25);
mailClient.EnableSsl = true;
mailClient.UseDefaultCredentials = false;
mailClient.Credentials = mailAuthentication;
mailClient.Send(mail);
</pre>
Above is the way i used to send a mail with embed image and this becomes slow to send mail i.e to send 5 mails for example it takes 3 minutes.
II
i tried to write an image inside td of Body message src=mypath instead of
src='cid:imageId' but result is i am getting mails deliverd but if i open a mail then mail not displayed any images
|
|
|
|
|
specify full path of your image like
http://yoursite.com/images/S.JPG....
|
|
|
|
|
Hi
Thanks image got displayed when i give path as you mentioned but in gmail when opening mail gmail is showing diplay images below i dont want to get message rather it should display image when user open a mail, can u tell me why i am getting error
|
|
|
|
|
No chance at all!!!. It's gmail's property. we can't change it...
|
|
|
|
|
hi
ok i agree with you and thanks a lot for your suggestion
|
|
|
|
|
Hello to everybody,
I'm currently developing a 2 level menu using jQuery... I load data from a Webservice and populate the toplevel item and sublevelitems... my webapplication is made of ascx and I've got a main page that load the ascx, I was wondering if there's a way using jQuery to notify the server that a menu item has been clicked ( I tried creating an ajax asp.net server control menu but got lost, so I moved to jQuery)...
Thanks in advance
Paolo
|
|
|
|
|
Hello,
I am planning to embed an ASPX file in my web application as an embedded resource. Now, when I call the file as an web resource url, I get the file downloaded as a text file instead of being executed. So, I think, if there is a correct mime type I can set for this aspx file, I can let the IIS know to execute it. Can you give me any idea?
I tried Virtual File System instead of web resource, and it works fine but only problem is, Virtual file cant be run on medium trust level hosting. So, your help is highly appreciated.
Regards,
Emran
|
|
|
|
|
IIS can only execute files, it can't execute a response. There is no mime type that can change that.
What is the reason that you want an aspx file as a resource? What is it that you are trying to accomplish, really?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
Thanks for the reply. Actually I am developing a Custom Server control where I render an IFRAME and I want to provide the content of the Src attribute of the IFRAME as an aspx file and I want to provide the file from embedded resource. If I use Virtual File system, It works, but as I said, Virtual File system does not usable in Medium trust hosting so I was thinking about using Embedded Resourse.
I dont want to ship any other aspx file beside my control dll as it will arise confusion to my user. Mroeover, I want to hide the code of the aspx file too.
Is there any better idea available to fulfil this purpose. !!
|
|
|
|
|
Hi,
I've a treeview bound with collections. As the treeview is quite big, it's put inside a div and added scrolling to it. But when i select any node beyond the scrolling capacity, i.e if i select the bottom node, then the Treeview automatically moves to top.
Can anybody give me a solution to this problem.
Thanks in advance.
Vijay
Vijay Mesa
|
|
|
|
|
Hi all,
I have been trying to use Javascript Confirmation Message Box in Asp.Net.
However, I can not get the return value of this message box.
I have tryed the method to add attributes at Page Load using the code like below:
********************
ibtnDelete.Attributes.Add("language", "javascript")
ibtnDelete.Attributes.Add("OnClick", "return confirm('Are you sure you want to delete this record?');")
This will bring up an OK/Cancel box when the button is clicked; if Cancel is then clicked the button's click event code won't run.
********************
But I want, firstly to run the click event of the button, and than according to some calculations
give the user a message asking whether he / she wants to continue??,
if the user says YES --> execute some code
if NO --> execute nothing
Is there a way to solve this problemm??
Thanks to everyone...
|
|
|
|
|
It's difficult mixing javascript confirmation with .cs code. The best bet for what you're trying to do is to use a modalpopupextender and then you have control over the buttons in your code.
|
|
|
|
|
hmmm, how can I use this (modalpopupextender)??
thanks...
|
|
|
|
|
It's part of the ajaxtoolkit.
I'm thinking it might even be better to use the ConfirmButton. Below is the url on how it all works.
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ConfirmButton/ConfirmButton.aspx
|
|
|
|
|
I created updated panel with button when click on button in update panel total page is reloaded,Then What is the use of Updated Panel?
www.funnydotnet.co.cc for dotnet developers
Best Regards
Rajesh Kumar Chekuri
www.rajeshchekuri.co.cc
|
|
|
|
|
The whole ASP.NET AJAX library is there for people who can't be bothered learning how to use AJAX themselves. It works just fine, if your needs are not high traffic or finely grained. I guess you must be doing it wrong.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You need to put a trigger on the update panel so it refreshes the updatepanel when the button is clicked.
<triggers> <asp:asyncpostbacktrigger controlid="NAME OF YOUR BUTTON" eventname="Click" xmlns:asp="#unknown">
|
|
|
|
|
hello
i've getted the following from a site :
private static object ThisLock = new object();
object dataObject = Cache["globalData"];
lock(ThisLock)
{
if( dataObject == null )
{
//Get Data from db
GlobalObj globalObject = GlobalObj.GetData();
Cache["globalData"] = globalObject;
}
}
return globalObject;
but what i need is :
if 2 session access the following code in the same time, does the second wait the first to the locked block and then execute the same code or do not execute the code and pass away from
dghdfghdfghdfghdgh
|
|
|
|
|
I'm not exactly sure about what you are trying to ask, but...
If a thread comes to a lock section that another thread has entered, it will wait until the other thread exits the section.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Does anyone know how to display a web page through a modal popup? I need for it to be dynamic as the web page will be different depending on what the user clicks.
Thanks so much for everyones help.
|
|
|
|