|
You can use a WebRequest or a WebClient object to post a form from code behind.
---
single minded; short sighted; long gone;
|
|
|
|
|
What would an example be using one of the Http methods you just mentioned given the format in my original post?
|
|
|
|
|
I don't understand why you have concerns, if the user changes the hidden fields either the payment won't go through or it will go to the wrong person/be the wrong amount (in which case its entirely their fault). I don't see that theres any confidential information there that you wouldn't want people to see, and as the form posts to a secure server no-one would be able to pick the request off the wire.
|
|
|
|
|
I don't want people changing the prices of things etc.
|
|
|
|
|
If you program it correctly that shouldn't matter - the response you get back from PayPal will contain the amount they paid, you can check that against how much they should of paid and if it doesn't match up show them an appropriate message. It won't affect a legitimate user and anyone who does it deliberately its their own fault.
|
|
|
|
|
That's a good point badgrs, thank you
|
|
|
|
|
Hi.
How can I execute an exe file in my web form.
I have an animation (Flash) that is in form of exe, how can I run it?
Best wishes
|
|
|
|
|
For security reasons, your web browser will disallow it. SWF format is allowed in OBJECT tag.
|
|
|
|
|
Hi,
In the html page in th epage tag i have: UICulture="ar-SA" Culture="ar-SA". Also
<html xmlns="http://www.w3.org/1999/xhtml" id="htmlID" runat="server" dir="rtl"
i set direction rtl, so that scrollbar and aligning of controls come right-to-left.
Also in the head section, i have:
<style type="text">
DIV.arabic
{direction: rtl; unicode-bidi: normal;}
</style>
And in div tag i set:
<div class="arabic">
So now the page should load in arabic style, like for eg. if the textbox is to the right and label to left, then in arabic style, it should load as the textbox to the left and label to right....Also if a table is there...then the column headers should also change in arabic style.
i hope you'll are getting what i want...the page should load in arabic style.
How can this be achieved...the alignment of text and scrollbar comes rtl, but the controls all in all should shift in arabic style...how can this be done?
could anyone please help me here...its urgent...
Thanks a lot...
Dee
-- modified at 2:06 Friday 25th May, 2007
|
|
|
|
|
hi...i got the solution...
|
|
|
|
|
HI
Plse help me in binding two table vlues into a crystal report..
I am not able to populate dataset with these two tables..
try until u succeed
|
|
|
|
|
Hi,
you create a new temp table C in stored procedure with table A columns and table B columns and insert the values into that C using results of A and B tables and return that table C to the dataset.So that dataset will have only one table.
In a nutshell merge two tables into one table.
Kiran Kumar.CH
(MCP)
|
|
|
|
|
Hi all....
i need to upload Excel file and save it into database. If anyone have code plz send me. it very urgent.
Suresh.R
|
|
|
|
|
You can store the binary content right? You should try doing a quick search for storing and retrieving images from sql server and you may like to do the same trick.
|
|
|
|
|
Hi,
I always get this error when i use events for controls in aspx, events like onClick(), checkedChanged(), ..
If I remove that event from aspx the error disappears, pls find the error details below.
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 96px" runat="server"
Text="Button" OnClick="NumericOnly_onkeypress(event)"></asp:Button>
I tried giving semi-colon after the function name like:
OnClick="NumericOnly_onkeypress(event);"
still i get this error. Has anyone come across this error?
Reagrds,
Blumen
|
|
|
|
|
HI Blumen,
I am not sure but try like this..
<asp:button id="Button1" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 96px" runat="server"
text="Button" onclick="NumericOnly_onkeypress">
Kiran Kumar.CH
(MCP)
|
|
|
|
|
Then I get the error saying that, this aspx does not contain a definition for "NumericOnly_onkeypress". This happens with RadioButton and CheckBox also, when i use its CheckedCHanged event
|
|
|
|
|
Make sure that autoeventwireup at page attribute is turned off i.e make it false if you are using IDE.
Make sure that "NumericOnly_onkeypress" event handler has correct arguments i.e
void NumericOnly_onkeypress(sender as object,e as EventArgs)
{
}
Tell me where you are writing this handler either in code behind i.e .cs file are inpage i.e in aspx file?
Kiran Kumar.CH
(MCP)
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">kiran kumar[Intelligroup] wrote:</div>Make sure that autoeventwireup at page attribute is turned off</blockquote>
It was turned off already, still same error
<blockquote class="FQ"><div class="FQA">kiran kumar[Intelligroup] wrote:</div>Tell me where you are writing this handler</blockquote>
in aspx
This is the function:
function NumericOnly_onkeypress()
{
if(window.event.keyCode<48 || window.event.keyCode>57 )
{
window.event.keyCode=false;
return false;
}
}
Regards,
Blumen
|
|
|
|
|
if you are using asp.net 1.1 do this way
remove onclick="NumericOnly_onkeypress" in aspx file and write
the statement like this in .cs file page load event
buttion1.attributes.add("onclick","NumericOnly_onkeypress");
if you are using asp.net 2.0 you can
write like this
Text="Button" önClientClick="NumericOnly_onkeypress">
Kiran Kumar.CH
(MCP)
|
|
|
|
|
Thanks Kiran, that did the trick for TextBox keypress event, but for Radiobutton and CheckBox, the function in aspx is not firing:
I gave it like this:
rbn1.Attributes.Add("OnCheckedChanged", "Onkeypress(this)");
rbn2.Attributes.Add("OnCheckedChanged", "Onkeypress(this)");
function Onkeypress(thiss)
{
if (document.getElementById (thiss.id).checked == true)
alert("checked");
}
Why does it work when I hook the event handler as an attribute? And why doesn't it work for RadioButton and CheckBox?
Regards,
Blumen
|
|
|
|
|
Now it will work because OnCheckedChange is serverside event.but your function is at client side naa so write like this
rbn1.Attributes.Add("onclick", "Onkeypress(this)");
rbn2.Attributes.Add("onclick", "Onkeypress(this)");
Kiran Kumar.CH
(MCP)
|
|
|
|
|
You are getting the server-side and client-side events mixed up. For an <asp:Button> OnClick is the server side event (and expects a function name that is in your code behind) and OnClientClick is where you can put client-side javascript calls (this attribute simply expects a string). Have a look at the MSDN documentation for more.
|
|
|
|
|
I couldn't find OnClicntClick for CheckBox and RadioButton, what do we do in that case?
|
|
|
|
|
Hi,
This is my first time trying stored procedures on ASP.NET using C# but I am having some problem with the return value. Here is my stored procedures
CREATE PROCEDURE IsValidLogin
(
@username varchar(15) = NULL,
@password varchar(12) = NULL ,
@num_of_user INT = 0
)
AS
BEGIN
SET @num_of_user = (SELECT COUNT(*) AS num_of_user
FROM tb_user
WHERE useremail = @username AND userpassword = @password)
RETURN @num_of_user
END
GO
Then here is my code (btw, this is for login)
try
{
if (myConnection.State == ConnectionState.Closed)
{
myConnection.Open();
}
myCommand = new SqlCommand("IsValidLogin", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
SqlParameter objParam1, objParam2, objParam3;
objParam1 = myCommand.Parameters.Add("@username", SqlDbType.VarChar);
objParam2 = myCommand.Parameters.Add("@password", SqlDbType.Char);
objParam3 = myCommand.Parameters.Add("@num_of_user", SqlDbType.Int);
objParam1.Direction = ParameterDirection.Input;
objParam2.Direction = ParameterDirection.Input;
objParam3.Direction = ParameterDirection.ReturnValue;
objParam1.Value = this.TextBox1.Text;
objParam2.Value = this.TextBox2.Text;
myCommand.ExecuteNonQuery();
Response.Write(objParam3.Value);
}
catch(Exception exception)
{
throw exception;
}
finally
{
myConnection.Dispose();
myConnection.Close();
}
It keep on returning '0' whiich I don't know where it gone wrong.
Your help is much appreciated.
Thank you.
J Liang
|
|
|
|