|
Can you please make sure that whatever code you are putting are inside the code block tag, before posting the thread? This will help to fix the problem soon.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
sorry about that.. have fixed my previous post layout.. hopefully someone can give me some helps?
cheers,
Still a newbie.. learning
|
|
|
|
|
Any help anyone?
thanks,
Still a newbie.. learning
|
|
|
|
|
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.DataBind();
DetailsView1.Visible = true;
}
Please help
|
|
|
|
|
|
Hi to all,
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:
public void gencrypt()
{
string mycrypt = "";
key = "EnNj72dXmScJUX45";
string mystring = strPost;
string temp = "";
SimpleXor(mystring, key);
Base64Encode(temp);
}
public void SimpleXor(string strIn, string strkey)
{
int iInIndex;
int iKeyIndex;
string strReturn;
if (strIn.Length == 0 || strkey.Length == 0)
{
return;
}
iInIndex = 1;
iKeyIndex = 1;
strReturn = "";
for (int i = 0; i <= strIn.Length; i++)
{
for (int j = 0; j <= strkey.Length;j++ )
{
strReturn = strReturn + (strIn[i] ^ strkey[j]);
iInIndex = iInIndex + 1;
if (iKeyIndex == strIn.Length)
{
iKeyIndex = 0;
iKeyIndex = iKeyIndex + 1;
}
}
}
}
public void Base64Encode(string strplain)
{
}
Please assist me..
cheers,
sneha
|
|
|
|
|
I dont understand what your issue is - a little search prduces many ways of doing it, including this Implementing XOR cipher encryption / decryption in C#[^]
but in reality Im not sure I'd be sending payment info to Sage or anyone else using simple xor encryption - if thats what they recommend I certainly wouldnt be dealing with them
'g'
modified on Sunday, January 24, 2010 4:02 AM
|
|
|
|
|
Hi..
I got update panel in my master page and in one of my content pages I got modal popup extender.
after one post back of my content page it gets visible on second postback...
do u have any idea ?
thanx,
By:
Hemant Thaker
|
|
|
|
|
Try again to explain your problem. It is not clear what you are trying to accomplish or how you are going about it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi..
thanks for reply.., i got some temparory solution,
I may draw your attention to this later on.
Thanks,
By:
Hemant Thaker
|
|
|
|
|
I am using this: btnDelete.Attributes.Add("onclick", "if(confirm('Are you sure you want to delete?')) Test1();else return false;")
my requirement is to be excute the function test1() but nothing happend
and iam also trying in this manner could anyone help me
Page.RegisterStartupScript("Confirm", "<script language=JavaScript>Confirm();</script>");
and in the aspx file (desiner) you need to write the following code
<script language="javascript" type="text/javascript">
Function Confirm() //Sample Function
{
var blnConfirm = confirm("sample function to test confirm function");
if(blnConfirm == true)
{
alert("you have clicked yes"); return false;
}
else
{
alert("you have clicked No");
}
}
</script>
|
|
|
|
|
use this code
<html>
<head>
<title>Custom ConFirm, Alert and Prompt</title>
<script language="javascript" type="text/javascript">
function FnConfirm()
{
var ans=confirm("Choose a button")
if (ans==true)
{
alert("You pressed OK");
FngoOK();
}
else
{
alert("You pressed Cancel");
FngoCancel();
}
}
function FngoOK()
{
window.location = "OK.htm";
}
function FngoCancel()
{
window.location = "Cancel.htm";
}
</script>
</head>
<body>
<input name="btnCheck" OnClick="FnConfirm()" Type="Button" Value="Click" />
</body>
</html> i tried this & working.
For server side you can do like this
btnDelete.Attributes.Add("onclick", "FnConfirm()")
|
|
|
|
|
thatraja wrote: btnDelete.Attributes.Add("onclick", "FnConfirm()")
Won't work without runat=Server on the input element.
Where did the OP ask about redirecting pages? and you are using far too much code to accomplish the very simple task
thatraja wrote: var ans=confirm("Choose a button")
You are uselessly creating another variable when this is enough
if( confirm("Choose a button") )<br />
...<br />
else<br />
...
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|Mark Nischalke wrote
1.Won't work without runat=Server on the input element.
2.Where did the OP ask about redirecting pages? and you are using far too much code to accomplish the very simple task
3.You are uselessly creating another variable when this is enough
=>1. I gave him a full HTML code and I was mentioned server side code will be like
btnDelete.Attributes.Add("onclick", "FnConfirm()") instead of
btnDelete.Attributes.Add("onclick", "if(confirm('Are you sure you want to delete?')) Test1();else return false;") also it wasn't mentioned as a client control by neither me or him.
=>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.
=>3.Here i copied his code & made some changes & posted here so i didn't created any new variable.
Happy coding Thanks
Regards,
thatraja
|
|
|
|
|
From your profile we can see you are not very proficient in these technologies. Perhaps do more studying before responding and answering.
thatraja wrote: btnDelete.Attributes.Add("onclick", "FnConfirm()")
This server side code can not be be called unless the client side element has the runat=Server attribute.
thatraja wrote: =>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.
thatraja wrote: =>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.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
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. 
|
|
|
|
|
I cant get you what you have studied if you are going to assist me in
learning technology i would be greatful and my mail id is mca.nath@gmail.com you can contact me through this maild
Thanks & Regards,
K. Amarnath.
|
|
|
|
|
Thanks for your help and i was to new to work with javascript
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
|
|
|
|
|
use the following script
<script language="javascript" type="text/javascript">
function FnConfirm()
{
if (confirm("Choose a button"))
{
window.location = "anotherpage.htm";
}
else
{
document.getElementById('anothertextbox').focus();
}
}
</script> Here 'anothertextbox' is the name of your another textbox.
|
|
|
|
|
Nath wrote: Page.RegisterStartupScript("Confirm", "Confirm();");
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>
<script language="javascript" type="text/javascript">
function Confirm()
{
if (confirm("Are you sure you want to delete?"))
alert("Yes");
else
alert("No");
}
</script>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello .net professionals,
My questions are:
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.
I appreciate your assistance so far.
Thanks in anticipation.
Happy programming.
|
|
|
|
|
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.
look at this
Visual Studio Setups (Web Setup Part I)[^]
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Thanks a lot, I am grateful.
|
|
|
|
|
|
Infact, millions of thanks.
I appreciate your support. Thanks
|
|
|
|