|
You can put Label in Template column.
In event RowDataBound of GridView put this code :
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lbl = (Label)e.Row.Cells[TemplateCellNumber].Controls[1];
lbl.Attributes.Add("onclick", string.Format(
"window.location = 'url?{0}={1}'",param1, param2));
lbl.Style.Add("cursor", "pointer");
}
}
and they all died
|
|
|
|
|
I have to save my web page with its images, by clicking button on web page
I used javascript as
document.execcommand("SaveAs").
but this can save Html (text) of web page, not images.If any one can tell how to do this either from server side or client side.
Najam
|
|
|
|
|
search for mht file format (Web Archieve or Single File)
hope this would help ...
Best Regards
3ala2
|
|
|
|
|
|
Hi,
My client request concatination of two inages and draw text on them
I sloved them
using of bitmap object, and it working fine in local host, here i given permission to folder i.e asp.net acc and etc..
When i hud that into client host image is not saving,
is tht requiers to set the permissons in client server?
Thanking U
Balu
|
|
|
|
|
guess u need to give permission to the ASPNET user but search for something to do that from ur code so that this problem doesn't occur another time somewhere else!
Best Regards
3ala2
|
|
|
|
|
Hello all, can someone please show me a set of codes that I can use to create a feedback webform that a user can send email with in visual studio?
Thank you.
Carol.
|
|
|
|
|
Here[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hello, I have tried some codes but they do not work. I tried a set of codes but the email could not be sent. I am currently using C#.
|
|
|
|
|
So now what code you tried and what exactly is the error which you are getting. Or simply the email is not going?
Best Regards,
Apurva Kaushal
|
|
|
|
|
I tried a code that was on a website, changed a few things so that the email will be sent to a particular address. It just didnt send the email, I could not receive the email.
|
|
|
|
|
are you using the correct SmtpServer for sending?
Best Regards,
Apurva Kaushal
|
|
|
|
|
I think so...do u want to hav a look at the codes? u can add me in msn messenger if u hav msn?
|
|
|
|
|
you can give it here itself, so that others can also take help if required.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Here is the code:
using System;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
public partial class _Default : System.Web.UI.Page
{
#region "Send email"
protected void btn_Sendmail_Click(object sender, EventArgs e)
{
{
// System.Web.Mail.SmtpMail.SmtpServer is obsolete in 2.0
// System.Net.Mail.SmtpClient is the alternate class for this in 2.0
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(TextBox2.Text, TextBox1.Text);
// You can specify the host name or ipaddress of your server
// Default in IIS will be localhost
smtpClient.Host = "localhost"; //localhost
//Default port will be 25
smtpClient.Port = 25;
//From address will be given as a MailAddress Object
message.From = fromAddress;
// To address collection of MailAddress
message.To.Add("issteam11@gmail.com");
message.Subject = "Feedback";
// CC and BCC optional
// MailAddressCollection class is used to send the email to various users
// You can specify Address as new MailAddress("issteam11@gmail.com")
message.CC.Add("issteam11@gmail.com");
message.CC.Add("issteam11@gmail.com");
// You can specify Address directly as string
message.Bcc.Add(new MailAddress("issteam11@gmail.com"));
message.Bcc.Add(new MailAddress("issteam11@gmail.com"));
//Body can be Html or text format
//Specify true if it is html message
message.IsBodyHtml = false;
// Message body content
message.Body = TextBox3.Text;
// Send SMTP mail
smtpClient.Send(message);
//lblStatus.Text = "Email successfully sent.";
}
catch (Exception ex)
{
//lblStatus.Text = "Send Email Failed. " + ex.Message;
}
}
}
#endregion
#region "Reset"
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox3.Text = "";
TextBox2.Text = "";
}
#endregion
}
This is how the form looks like
Feedback form
Your Name: textbox1
Your email address :textbox2
Your message :textbox3
|
|
|
|
|
Carol. wrote: / You can specify the host name or ipaddress of your server
// Default in IIS will be localhost
smtpClient.Host = "localhost"; //localhost
//Default port will be 25
smtpClient.Port = 25;
Inspite of this can't you give just the domain name(mail.YourDomain.com)..
Best Regards,
Apurva Kaushal
|
|
|
|
|
I am not sure what u mean? no, I don't think it will work, it will generate some error. I am not very good with these codes, I just followed the codes given.
|
|
|
|
|
probably you would like to look at
this[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi all,
I just want to know how can i download an image from an URI specified..
please check it using this link.
http://a1472.g.akamaitech.net/f/1472/124/4h/img.ebags.com/is/image/im1/59011_1_1?&op_usm=.5,1,0,1&hei=249&wid=249
Please help me in this matter ASAP..
Thanx in advance..
Nicejith
|
|
|
|
|
Nice boot.
What is it that you are trying to do?
---
b { font-weight: normal; }
|
|
|
|
|
I just want to download the image shown in that URI and to save it in a folder in the server.
I can download other images given like www.abcd.com/xyz/image1.jpg.
But when i try to download the image in the given url there occurs an error- "Uri formats are not supported".
Now i'm using the code format as follows
wc= new WebClient();
wc.DownloadFile(givenurl,wheretosave);
Please help me to solve this problem..
Regards
Nicejith
|
|
|
|
|
What is the exact error message?
I tried your code with the url you gave in the original post, and it works just fine.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
The actual problem was with the url i supplied.The problem occured when i tried to upload bulk product details from a file to the application's database.The url contained blank spaces, i think. now i gave code for trimming and removing some extra parameters from the url in my application. Now it works smoothly..Thanks for the efforts you made..
Regards
Nicejith
|
|
|
|
|
Can any one send code for deleting an items from a datagrid control.
|
|
|
|
|
Here[^] you will get lots of example of datagrid which will be verymuch helpful.
Best Regards,
Apurva Kaushal
|
|
|
|