|
Can u please send me a sample for Grid view where I have a column where I can edit, delete and insert data in Gridview.
|
|
|
|
|
|
|
Hi, I am trying to set up a text box, which as soon as the page loads, the IP of the visitor is shown in a Text Box.
The Text Box must also be locked, so that the user can see the IP, but not edited.
I am using the following code:
<asp:TextBox ID="TextBox4" runat="server" ReadOnly="true" Text="<%(Request.ServerVariables("remote_addr"))%>"></asp:TextBox>;
But it is not getting the IP address, instead it is just displaying: <;
Any help about how I should tackle this problem?
(Btw, I'm using C# in Visual Studio)
|
|
|
|
|
use proper bindig with text. u missing the method which bind the data with Text Property. make changes as follows.
Text='<%#Eval(Request.ServerVariables("remote_addr"))%>'
Regards
Keyur,
"Always Be Happy, Live Life Long"
|
|
|
|
|
When I did that, it gave me the following error:
'System.Web.HttpRequest.ServerVariables' is a 'property' but is used like a 'method' H:\VisualProgramming\2\guestbook.aspx 41
|
|
|
|
|
check it for syntax and make proper concatenation of string.
Regards
Keyur
|
|
|
|
|
|
i write a method retun string in cs file
and i call this method in javascript function
but it gev me error
here is the code
<script language=jscript type="text/javascript" >
function SetDate()
{
window.opener.document.getElementById("txt_Date").value=<%GetSelectedDate();%>;
}
</script>
MD_NADA
|
|
|
|
|
based on what you wrote it looks right.
Provide what the error is and code from the opener to get an answer. also code for when it's called.
|
|
|
|
|
Is there anything wrong with this? This is verbatum how is looks on the server but it wont send. It takes you to the redirect page while its simultaneously attempting to send the form fields to the mail server (smtp.whatever.com) and the redirect page give you the 'else' error at the very bottom.
protected void SendMail(String strBody)
{
String strONOES;
String strFromEmail = "joel.dunn@yahoo.com";
String strFromName = "Dealer Request";
try
{
MailMessage msgMail = new MailMessage();
MailAddress maFrom = new MailAddress(strFromEmail, strFromName);
msgMail.From = maFrom;
msgMail.To.Add(new MailAddress("joel.dunn@yahoo.com"));
msgMail.ReplyTo = (new MailAddress(txtEmail.Text));
msgMail.Subject = "Bathwraps Find a Dealer";
msgMail.IsBodyHtml = true;
msgMail.Body = strBody;
SmtpClient mSmtpClient = new SmtpClient();
mSmtpClient.Host = "smtp.bathwrapstexas.net";
mSmtpClient.Send(msgMail);
Session["Request"] = "Request";
-------------------------------------------------------------------------------------------------
protected void SetLabel()
{
if (Session["Request"] == "Request")
{
lblBody.Text = "Thank you for your submission. You will be contacted soon about becoming a Bathwraps dealer.";
}
else if (Session["Request"] == Request)
{
lblBody.Text = "Thank you for your submission. A Bathwraps dealer will be contacting you shortly.";
}
else
{
lblBody.Text = "There was an error submitting the e-mail form. Please try again later.";
}
}
If I said something clever or genius here I'd feel repetitious...
|
|
|
|
|
make changes at follows
instead of mSmtpClient.Host = "smtp.bathwrapstexas.net"
put your mail domain
eg.
mSmtpClient.Host = "mail@bathwrapstexas.net"
this will work
try this
Regards
Keyur
"Always Be Happy, Live Life Long"
|
|
|
|
|
I have the following coding in my web form.
var type = (from p in entities.Address select p);
this.GridView2.DataSource = type;
this.GridView2.DataBind();
Here in table Address I have one column named "Status" which is foreign Key. When I selected all the columns and try to bind with GridView it is not showing that column which is forign key. What is the reason.
Thanks
|
|
|
|
|
Hi,
where i can find real information about speed and usability of ASP.NET as a platform for online game?
Someone knows any online games(in web browser) which used ASP.NET not PHP?
Greetings
|
|
|
|
|
I can't find to many good resources at all, and fewer less examples, I don't know if ASP.NET is right for a gaming application.
I might be wrong, better wait for a more experienced answer.
|
|
|
|
|
Using ASP.Net as a platform for webbrowser based online game is like using the Safety Car in a Formula 1 race. You will slow down resources and lose the scope.
|
|
|
|
|
Any links to reliable information on which your opinione is based?
|
|
|
|
|
If your game has 3D and graphics effects, think about Silverlight. It can be hosted on top of asp.net 2.0 platform.
|
|
|
|
|
|
|
hi,
i like to enter the date using three drop down lists
i.e in the first dropdownlist it must show date 1 to 31
In second drop down list it must show names of the months like jan,
feb,mar,apr.....
In third drop down list it must show the years 1.e from 1947 to
current year (2009).
And one more is in my databse i like to save my date in the format
of 1/01/2000.
how i can change my string value jan,feb to int value i.e 01,02...
in the database.
Plz help me by posting the code...its very urgent....
Thanx in advance
|
|
|
|
|
Dropdown List containing two property one is "Text" and other is "Value".
Now Text field you can use month name and Value field you can use as number value.
<asp:DropDownList ID="t" runat="server">
<asp:ListItem Text="Jan" Value="01"></asp:ListItem>
</asp:DropDownList>
Parwej Ahamad
|
|
|
|
|
Hi,
I am using ASP.Net 1.1. I want to stop getting run time messages when the application is run and the complete trace information. How can I do the same.
I have already done this in web.config file
<compilation defaultlanguage="vb" debug="false">
and even on the page level.
I even compiled my applicaiton in Release mode.
Removed all the .pdb files previously generated.
But still I am getting the run time message.
Rgds,
Renu
|
|
|
|
|
Is there Try and Catch is not helpful for the same ?
Parwej Ahamad
|
|
|
|
|
Try and catch are there..but there are many time run time error's which are not catched.
|
|
|
|