|
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
|
|
|
|
|
|
Wrong place; if you want people to use your software, then write an article about it.
Use the best guess
|
|
|
|
|
Upload your library on codeplex, millions of people will get to know... also you can write article on this.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
I am sending emails as HTML using MailMessage in C# and I am showing my website logo at the top of the email message. Currently I am showing my logo as but as you know using such way it will not show the logo when the user is not connected to internet and in addition, most of web based as well as email clients will prompt the user to show or not show the image.
Is there any way, to embed the image in my email so it will force showing it?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Yet again, you could find some solutions by doing this[^].
Use the best guess
|
|
|
|
|
You can embed your images to the email.
Example:
Let say you want Image1.jpg to show in you email
Attached the Image1.jpg to you email and your img tag will look as follows:
<img src="cid:Image1.jpg" width="100" height="100" />
it is better to host your images than embedding it, last time I checked, gmail does not embed the images but it has been a while when I used this way, just test it in web mail clients.
|
|
|
|
|
Hi all
I have problem with respons.redirect()?????
I have wrote a website with Asp for authentication users,
in login.aspx file I have wrote a script code witch authenticate user.
I want to load another file after successfull login.
this is my code in login.aspx file:
btnLogin_Click(object sender AuthenticateEventArgs e)
{
Boolean blnresult;
blnresult = false;
blnresult = Authentication(Login1.UserName, Login1.Password);
if (blnresult == true)
{
Response.Redirect("~/Welcom.aspx",false);
Context.ApplicationInstance.CompleteRequest();
e.Authenticated = true;}
<asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
<asp:Login ID="Login1" runat="server" >
</asp:Login>
</asp:content>
but after login the Welcom page doesnt load!!!!
what do you think about this?
why it doesnt work?
|
|
|
|
|
If the redirection is to another script on the same server, use Server.Transfer instead.
The code lines following the redirect/transfer don't get executed. Swap around.
Your comment // This is the actual statement which will authenticate the user, is in the wrong place
the line
blnresult = Authentication(Login1.UserName, Login1.Password) does the authentication, and is very likely that function is where your problem is.
Use Response.Write to find out what blnresult state is after Authentication.
"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 10-Apr-13 11:04am.
|
|
|
|
|
thank you so much
I think that you are right;
I undrestood that the problem is in another file in my "add new user.aspx" file,in that I add a new user into my table but I think it doesnt work correctly,it doesnt add any row to my table,I dont know why?
this is my code in "add new user" file:
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection();
string connectionstr=@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\EHSAN\Documents\Visual Studio 2010\Projects\The Club\The Club\App_Data\Database1.mdf;Integrated Security=True;User Instance=True";
con.ConnectionString=connectionstr;
string sqlstring;
sqlstring ="insert into Authenticate (username,password)VALUES ("+ CreateUserWizard1.UserName+","+CreateUserWizard1.Password+")";
System.Data.SqlClient.SqlCommand objcommand = new System.Data.SqlClient.SqlCommand(sqlstring, con);
Response.Redirect("~/Login.aspx");
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="server">
<asp:CreateUserWizard ID="CreateUserWizard1" Runat="server"
oncreateduser="CreateUserWizard1_CreatedUser">
</asp:CreateUserWizard>
</asp:Content>
plz help me!
thank you...
|
|
|
|
|