|
|
use javascript to display/hide your image.When one sets the visible as false that HTML doesn't render at the page.
Cheers!!
Brij
|
|
|
|
|
abbd wrote: unfortunatly when i click on the login button the picture don't be appeared, please help met to show this picture, T
Showing progress bar is nothing to do with just displaying a image. First of all be clear on why you want show progress bar. If the login process taking time and you want to show progress bar you can use AJAX Update panel and AJAX Progress bar.
http://www.asp.net/Ajax/Documentation/Live/overview/UpdateProgressOverview.aspx[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Dear all,
please any one can help me to understand how this website is working www.ratemyarea.com.
i want to make like this website for me, but i can't do it, any help.
|
|
|
|
|
I am not sure about the answering your questions. You want to use google map in your web application or what ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
yes i want but connect with database.
|
|
|
|
|
|
thanks but if i have a database and i save all the marks in it and i want to retreive all marks to my map how can i do it???
|
|
|
|
|
Check in the last example, I am using AJAX to get the XML data from the server. Just replace the XML datasource with your appropriate data.
It is very easy to do that, I have done that lots of time.
Other than that, you can also place the retrieved points in some hidden field and place markers in the pageload.
Hope you got it.
|
|
|
|
|
Hi peoples,
Need a clarification in MSSQL, here there is no separate board is there,
can i post the SQL question here?
|
|
|
|
|
Ask your Question in General Database forum.It will be more helpful
Cheers!!
Brij
|
|
|
|
|
thanks brij i was looking for the word SQL, didnt see the DB thanks
happy new year
|
|
|
|
|
Happu new year you too dude
Cheers!!
Brij
|
|
|
|
|
Hema Bairavan wrote: can i post the SQL question here?
General Database is most appropriate
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
yes abhijit, i have posted there.. if u have time please check there and revert me
thanks and happy new year
|
|
|
|
|
Hi All
I have the following code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<script language="C#" runat="server">
protected void button1_Click(object sender, EventArgs e)
{
try
{
TextBox1.Text = (TextBox1.Text + "<strong></strong>");
Label1.Text = (TextBox1.Text);
}
catch (System.Web.HttpRequestValidationException)
{
Response.Write("html is not allowed");
}
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Height="300px" Width="400px"></asp:TextBox>
</div>
<asp:Button ID="button1" runat="server" Text="strong" onclick="button1_Click" />
<asp:Label ID="Label1" runat="server"></asp:Label>
</form>
</body>
</html>
If i click on button twice I am getting request validation exception which I want to catch.
The error which I am getting is
*************************************************************************
Server Error in '/TextControlOnSite' Application.
--------------------------------------------------------------------------------
A potentially dangerous Request.Form value was detected from the client (TextBox1="<strong></strong>").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (TextBox1="<strong></strong>").
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\textcontrolonsite\d5a3eadf\30926e30\App_Web_rwvmmuiv.0.cs Line: 0
Stack Trace:
[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (TextBox1="<strong></strong>").]
System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +3310274
System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +108
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +3312222
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +45
System.Web.UI.Page.DeterminePostBackMode() +65
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\textcontrolonsite\d5a3eadf\30926e30\App_Web_rwvmmuiv.0.cs
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1873; ASP.NET Version:2.0.50727.1433
***************************************************************************
I have put try catch block but it is not executing.
I know that we can use Server.HtmlEncode and Server.HtmlDecode method and also knows that ValidateRequest property of page attribute.But in my case i want to execute some code only on this page when the RequestValidation Exception occurs.
I donot want to handle error in global.asax file.
I want to handle error on this page only.
Please suggest.
Thanks
Regards
Sandeep
|
|
|
|
|
The solution is present in your exception itself.
put validateRequest="false" in your <%@ Page directive
This will solve your problem.
Try google and you will know why this exception occurs while posting back.
|
|
|
|
|
Why do you want to catch exception at server side.. you can do it by custom validator also
but if you want to do it server side only... put ValidateRequest="false" in page attribute.. Now .Net allow this request to go server side.Now make your handler to throw some exception according to your need and show the message accordingly..
Cheers!!
Brij
|
|
|
|
|
I am writing a code which send Email to the respective email address. First time its working fine. But after sending my first email its not accept my program and I am not able to send email again. I put the code snippet here.
Dim smtpServer As New SmtpClient
Dim messageSTR As New MailMessage
Dim strAddress As New MailAddress("Email address", "Name")
messageSTR.From = strAddress
messageSTR.To.Add("To Email Address")
messageSTR.Subject = Me.txtSub.Text
messageSTR.Body = Me.txtMailBody.Text
smtpServer.Host = "smtp.gmail.com"
smtpServer.Port = 578
smtpServer.Credentials = New NetworkCredential("user id", "user pass")
smtpServer.EnableSsl = true
smtpServer.Send(messageSTR)
What is the problem? Why I don't send the second mail?
Exception Shown: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 209.85.129.109:578.
Error Message: Unable to connect to the remote server
modified on Friday, January 1, 2010 11:23 AM
|
|
|
|
|
Can you post the error details that you are getting.It'll be of helpful to give the relevent answer
Cheers!!
Brij
|
|
|
|
|
The problem was,
I am writing the invalid port number.
I put portnumber=578 But it should be 587.
Thanks.
|
|
|
|
|
is your problem resolved? If so kindly write it so that others may know that your problem is resolved
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
ok.. but wasn't it created the problem in sending first mail ?
Cheers!!
Brij
|
|
|
|
|
At first, I send mail using default port number. Then I take it from the user and then creates the problem.
Thanks
|
|
|
|
|
Hi,
I have a project requiement to build a facebook like website in C# & ASP
In this website:
- Allow at least 3 types of users: unregistered visitor, registered user and moderator
- Allow users to create profiles and upload images etc.
- Any user can search for people and view public profiles
- Registered users can create a profile which can connect with other members or groups of people can join. Each user can set their profile : public or private.
- Each user can add albums with pictures. Every picture may receive comments from friends or from other users which the user can accept or reject
- The user has one mailbox that can communicate with other members of the site.
etc etc
I am a novice when it comes to coding, I have so far been able to create profiles and allow uploading of images and returning but I seem to be lost at doing stuff like retrieving a user's images when his profile picture is clicked etc etc. Are there any references you guys could point me to that would give me more information on developing this. I like doing things on my own but would be useful if I could refer to a source for more info when I got stuck.
Thanks so much for helping!
Kool
|
|
|
|