|
Unsubscribe from a newsletter or what?
|
|
|
|
|
Going by the little you've given us on details regarding your requirement, I'll try to give a hint on how I'd go about doing something like this.
Scenario:
You have a user signed in to your application and want to provide a link for said user to unsubscribe to something he formerly subscribed to.
Solution:
Have a link on your pages that will make a call to a WebMethod via AJAX and unsubscribe the user. The feedback you get from said AJAX call, received via a JAvaScript callback function, can be used to change the user's status to unsubscribed (just to give the user some optical feedback that he is now unsubscribed). To make this information persistent, you'll have to store the user's status in a database or some configuration file.
Regards,
— Manfred
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
I have 7 textboxs and grid view controls we are given the value at one textbox is date and i have sqlserver2005 and my table is
stv this table contain the datetime variable i.e. rdate we are given the date is in text box and stored the particular date data
in grid view but given the error message 'convertion is failed string to date time'
modified 12-Apr-13 7:49am.
|
|
|
|
|
Have a look at the content of the string; is it a valid date and time?
Use the best guess
|
|
|
|
|
yes it's valid date ie.mm/dd/yyyy
|
|
|
|
|
agrigold wrote: mm/dd/yyyy That is not a valid date, something like 21/03/2013 would be a valid date. However, unless you provide some useful information about the problem it is impossible to guess what may be happening.
Use the best guess
|
|
|
|
|
You need to make sure, your input is in correct culture. if your database accepts MM-dd-yyyy and you are entering dd-MM-yyyy or some other format then you may got such error message. just make sure both database and application accepts same datetime style.
best luck
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
There is no error but the slide show is not animating only the images are coming they are not changing...
This is my code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pic.aspx.cs" Inherits="pic" %>
<!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">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/coin-slider.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/coin-slider-styles.css" type="text/css" />
<script type="text/javascript">
$(document).ready(function () {
$('#coin-slider').coinslider();
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div id='coin-slider' align="center">
<a target="_blank">
<img src='l5.jpg' height="150px" width="150px">
<span>
</span>
</a>
<a>
<img src='bed1.jpg' height="150px" width="150px">
<span>
bed
</span>
</a>
<a>
<img src='d1.jpg' height="150px" width="150px">
<span>
</span>
</a>
</div>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
dont know how to call the coin-slider div if necessary to asp.net cs .
|
|
|
|
|
|
Thanks for not promoting my script or tip or trick
Just kidding, side punch, you probably didn't know about it!
|
|
|
|
|
|
It would be easier for us to read if you can use
pre tag.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
I am learning MVC. I want to refresh the same partial view while clicking on a button. the button is on the same partial view
How will I do this? Any help would be appreciated.
|
|
|
|
|
You can use the onclick event of the Button as an serverside event and create a sub with the "handles buttonx.click" or you can insert an Java Funtion in the onclick statemant of the Element to fire an Postback...
Martin
|
|
|
|
|
I have an AJAX asp:Timer that when added to my LogView.aspx page causes a javascript error in the browser:
Expected ';'
Default.aspx Line: 963
Code
First, the page that is being displayed in LogView.aspx and not Default.aspx. Also there is no javascript on my LogView.aspx page:
<form id="form1" runat="server">
<asp:ScriptManager ...>
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick" />
<asp:TextBox ID="TextBox1" runat="server" Text="" />
</ContentTemplate>
</asp:UpdatePanel>
The code behind is:
protected void Timer1_Tick(object sender, EventArg e)
{
TextBox1.Text = "Hello";
}
Also, when run the Timer event is never called. I did a view source and the error line shows where the onLoad () System.Application.add.init(function () {$create(Sys.UI._Timer, ...
This is confusing. Any Ideas?
Thanks,
Steve Holdorf
|
|
|
|
|
Try using proper closing tags instead of using /> on a single tag.
ajax-timer-ontick-event-how-to-use.html
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Thanks for your help. I did try both ways and still the javascript error. Again thanks!!!!
Steve Holdorf
|
|
|
|
|
What language is the ASP page coded with, C#?
I just wonder what's being sent to the browser, like an erroneous block of C#.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
modified 12-Apr-13 4:49am.
|
|
|
|
|
It is writen in C#. When the ajax timer is removed from the page no javascript errors occur. The timer event is correct and on compile no build errors.
Thanks,
Steve Holdorf
|
|
|
|
|
I am posting this after 100 hours research and no solution.
I have this application written in vb.net / asp.net / Ext.net / ms sql 2008
It was working fine so far, recently i have decided to upgrade my VS to to VS 2012 ( What a mistake...) I installed it and run my application i have started to getting below error message
"
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. "
I have uninstalled everything that comes with VS2012 but still no luck same error....
When i chase this error i saw that i am getting the exception at where i open my connection to my ms sql 2008 database. Here is my connection class
"
_____________________
Public Shared Sub Connect()
Try
Dim Con As New SqlConnection
Con.ConnectionString = "Data Source=xx.xx.xxxx,1533;Initial Catalog=XXXX;User Id=ezman;Password=XXXXXX; Connection Timeout=45;"
If Con.State <> ConnectionState.Open Then
Con.Close()
Con.Open()
End If
Catch ex As Exception
Con.Close()
End Try
End Sub
_______________________________________________________________________
debugger goes till con.open() line and then throws the exception.
I have removed and added back all system.data dlls already.
Here is a stack trace for more details
at SNIAddProvider(SNI_Conn* , ProviderNum , Void* )
at SNINativeMethodWrapper.SNIAddProvider(SafeHandle pConn, ProviderEnum providerEnum, UInt32& info)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at ezmanHelper.Connect.DBConn() in C:\Users\erkan\Documents\Visual Studio 2010\Projects\ezman1\ezmanHelper\Connect.vb:line 20
at ezmanHelper.AppMenu.GetMenuHeaders(String UserId) in C:\Users\erkan\Documents\Visual Studio 2010\Projects\ezman1\ezmanHelper\AppMenu.vb:line 6
at ezman1.Main.Page_Load(Object sender, EventArgs e) in C:\Users\erkan\Documents\Visual Studio 2010\Projects\ezman1\ezman1\Tabs\Main.aspx.vb:line 8
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.tabs_main_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at System.Web.HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
at Microsoft.VisualStudio.WebHost.Request.Process()
at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
at Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(Object acceptedSocket)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
|
|
|
|
|
Does that comma between the ip address & port number exist in your code, or is it just a typo when you created the message?
It should be a colon :
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
beker_usa wrote:
If Con.State <> ConnectionState.Open Then
Con.Close()
Why are you trying to close a connection that is not open?
Use the best guess
|
|
|
|
|
Hi,
can anyone recommend a good and stable SMS gateway which has ASP.NET APIs?
Thanks.,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I can recommend you to use Essendex services http://www.esendex.com
Sylvain
|
|
|
|
|
When I tried to perform Load Testing my Asp.net MVC application, I test application with 30 concurrent users and Application pool stops automatically due to some Window Process Activation Service failed!!
Error :-->
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
In Event Viewer WAS is giving below erros
1) application pool is being automaticall disabled due to a series of failures in the process service that application pool
2) A process service application pool "xyz" suffered a fatal communication error with Windows Process Activation Service. The data field contains the error number
|
|
|
|
|