|
I have a domain where queries will be in form www.domain.com/demo12345
demo12345 being a code I need to grab & process.
I need to have a single page to process these requests and the only thing this domain does, is that it reads the code and processes it.
Can I do this on that domain itself or do I need to configure a redirection in IIS and grab the code from the referrer url?
|
|
|
|
|
use this function
Request.RawUrl()
it returns a string so u do string manipulation to get the part u want from it
hope this would help ...
Best Regards
3ala2
|
|
|
|
|
The only problem being that how do I pass the request to the asp.net without having .aspx in the url and how do I prevent the server considering the code as folder and returning HTTP 404 when the URI is requested?
Any references?
|
|
|
|
|
Now if u keep the class name the same and change the aspx page name to "Default"
if u have a folder called "ABC123" and the "Default.aspx" page is saved in it this link will work
http://localhost/YourProject/ABC123
and will redirect u to the "Default.aspx" page
if this isn't helpful please post more detailed scenario ...
Best Regards
3ala2
|
|
|
|
|
I'll answer this myself:
Installing Wildcard Application Mappings (IIS 6.0) will configure a Web site or virtual directory to run an Internet Server API (ISAPI) application at the beginning of every request to that Web site or virtual directory, regardless of the extension of the requested file.
This effectively means that no matter what was requested, it's first handled by aspnet_isapi.dll (as I configured it)
After this, it's only a matter of Url Rewriting with ASP.NET
Thanks for attention
|
|
|
|
|
That's great man
Best Regards
3ala2
|
|
|
|
|
Dears Hi,
Im using VS 2005 and Instead of using SELECT in GridView I need to use on of GridView column as link to anther page and pass values to second page
I use template column but how I can pass parameter and specify the link
I use the following but is not working
<br />
href ="~/xyz/page2.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID") %>"><br />
thanks....
|
|
|
|
|
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
|
|
|
|