but now I want to add in a Autologin page which takes a username query string and automatically authenicate the user.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If page.querystring("username") = "" Then
Dim username As String = page.querystring("username")
Dim mu As MembershipUser = Membership.GetUser(username)
If Membership.ValidateUser(username, mu.GetPassword()) Then
If page.querystring("ReturnUrl") <> "" Then
'some action if failed
but don't know why the Response.Redirect("~\secure\vieworder.aspx") redirects me back to the original login page.... looks like the setauthcookie is not authenicating the passed in user properly?
I have one table in SQL DB. It's call "articles" and one of the fields is call "title".
When I search for a cyrilic title in my articles in SQL BD, anything is not found. But when I search for a latin title, it works.
Here is my code:
protected void btnSearch_Click(object sender, EventArgs e)
SqlDataSource1.SelectCommand = "SELECT * FROM Articles WHERE Title LIKE '" + TextBox1.Text + "';";
DetailsView1.Visible = true;
Actually I am working on a e-commerce portal. We are using sage pay (payment gateway) for the transaction.While sending data to sage for transaction, the data should be encrypted. For this data should be encrypted using Simple XOR algorithm and then should be Base64 encoded. Can anyone have any idea about this. I am trying like this:
This server side code can not be be called unless the client side element has the runat=Server attribute.
=>2.Actually he called a function Test1() in his code so that i was created a 2 dummy functions for redirects based on the response for easy understand to him.
Again, where is it stated by the OP that a redirected was needed? By added unnecessary features you may have done more to confuse than to help.
=>3.Here i copied his code & made some changes & posted here so i didn't created any new variable.
From this we can tell you are probably very profeccient at copy and paste coding and don't fully understand what you are doing. If you knew what you where doing you should have corrected the OPs code and explained why.
You are right mate, still didn't completed my Master degree & i hope it will take a year to complete. And now i'm started to studying in latest things in those technologies so that i joined also Codeproject this month which is nice.
|Mark Nischalke wrote This server side code can not be be called unless the client side element has the runat=Server attribute.
but here the btnDelete is a server side element so that i was added the attribute in runtime. Again, where is it stated by the OP that a redirected was needed? By added unnecessary features you may have done more to confuse than to help.
I accept this one my mistake because i didn't thought about his confusion by the redirection code. It would be better if i put those alert messages instead of redirections inside those dummy functions. From this we can tell you are probably very proficient at copy and paste coding and don't fully understand what you are doing. If you knew what you where doing you should have corrected the OPs code and explained why.Actually already he was posted some sample code which has some issue. But i thought it would be better to make some changes in that code instead of writing an new one because he may be confuse here too. Also i have waited for his response. That's all.
Thanks for your feedback
Mate can you help me for my study by preferring things in technologies. Also i have visited your profile page but your blog isn't write mode for me. how to contact you? Please help. Thanks.
and if user clicks on ok then i have to redirect to another page
that is happening if on cancel then i have to focus him on a text
control. I will try for that. once again very thanks for your help
It is unnecessary to register the confirm script since you have already included it in the page.
<input type="button"value="Click Me" onClick="Confirm()"></input>
if (confirm("Are you sure you want to delete?"))
How do I go about my (asp.net) web application deployment?
Is it possible to package it as .exe file that will now be installed on any machine? If yes how.
How can I get Ms SQL client software so that the application can run on it.
How can I make sure that the first-time the (web) application is run, it runs my database script to create the application's database and other objects on the installation machine. Or to run the script while the application is installing.
Any other vital things for me to know about deployment. Please tell me.
1)Yes it is Possible. go to your Solution Explorer and Right click on the Root of your Solution and select a New Project and in the Dialog box , select other Project and you will see websetup. Give it a name and when you create a setup meaning when you are happy with your web app , then you need to build your setup to release not debug and a file in the Release folder in your setup Project Directory will be created. that is what you should ship.
2)Do you mean SQLExpress? google it you will find a lot of hits on that.