Showing posts with label request. Show all posts
Showing posts with label request. Show all posts

Saturday, March 31, 2012

Submitting Form to Database

I have an ASP.Net page created with a table I made to look like a form
for our benefit request program. How do I code this properly to send
it to a table in our database.

For the sake of me learning how to do this lets just do short example
like. I have an aspx page with a label for name and a text box where
a user can input their name.

I have a database table called tblName with a column called name where
the submitted names go.

How do I code it so the name is submitted, a confirmation page is
shown and the data goes to the database when I click submit? Any help
is greatly appreciated.

Thanks,
BenIf you look at the ASP.NET QUICKSTART tutorials on the asp.net website, it
has lots of examples like this. QUICKSTARTS also installs as an option with
Visual Studio.
--
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
"Ben" wrote:

Quote:

Originally Posted by

I have an ASP.Net page created with a table I made to look like a form
for our benefit request program. How do I code this properly to send
it to a table in our database.
>
For the sake of me learning how to do this lets just do short example
like. I have an aspx page with a label for name and a text box where
a user can input their name.
>
I have a database table called tblName with a column called name where
the submitted names go.
>
How do I code it so the name is submitted, a confirmation page is
shown and the data goes to the database when I click submit? Any help
is greatly appreciated.
>
Thanks,
Ben
>

Submitting Form to Database

I have an ASP.Net page created with a table I made to look like a form
for our benefit request program. How do I code this properly to send
it to a table in our database.
For the sake of me learning how to do this lets just do short example
like. I have an aspx page with a label for name and a text box where
a user can input their name.
I have a database table called tblName with a column called name where
the submitted names go.
How do I code it so the name is submitted, a confirmation page is
shown and the data goes to the database when I click submit? Any help
is greatly appreciated.
Thanks,
BenIf you look at the ASP.NET QUICKSTART tutorials on the asp.net website, it
has lots of examples like this. QUICKSTARTS also installs as an option with
Visual Studio.
--
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
"Ben" wrote:

> I have an ASP.Net page created with a table I made to look like a form
> for our benefit request program. How do I code this properly to send
> it to a table in our database.
> For the sake of me learning how to do this lets just do short example
> like. I have an aspx page with a label for name and a text box where
> a user can input their name.
> I have a database table called tblName with a column called name where
> the submitted names go.
> How do I code it so the name is submitted, a confirmation page is
> shown and the data goes to the database when I click submit? Any help
> is greatly appreciated.
> Thanks,
> Ben
>

Submitting form from the Server Control

Hi,

the form data exists in the Request.Form collection. how do you mavigate
from Page1 to Page2?
if you use server.transfer make sure the the secound parameter set to
true otherwise the Form wont redirect to Page2.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi,

Thanks for the info. I was using Response.Redirect to redirect to the next
page. Because of that I was not getting the submitted value.

Regards

Pradeep

"Natty Gur" <natty@.dao2com.com> wrote in message
news:uBoQVf7ZDHA.1744@.TK2MSFTNGP12.phx.gbl...
> Hi,
> the form data exists in the Request.Form collection. how do you mavigate
> from Page1 to Page2?
> if you use server.transfer make sure the the secound parameter set to
> true otherwise the Form wont redirect to Page2.
> Natty Gur, CTO
> Dao2Com Ltd.
> 34th Elkalay st. Raanana
> Israel , 43000
> Phone Numbers:
> Office: +972-(0)9-7740261
> Fax: +972-(0)9-7740261
> Mobile: +972-(0)58-888377
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Hi,

One more thing. When i use Server.Transfer, the URL of the IE doesn't get
updated with the current form. Also it always displays the URL of the last
Form.

Any idea ?

Pradeep

"Natty Gur" <natty@.dao2com.com> wrote in message
news:uBoQVf7ZDHA.1744@.TK2MSFTNGP12.phx.gbl...
> Hi,
> the form data exists in the Request.Form collection. how do you mavigate
> from Page1 to Page2?
> if you use server.transfer make sure the the secound parameter set to
> true otherwise the Form wont redirect to Page2.
> Natty Gur, CTO
> Dao2Com Ltd.
> 34th Elkalay st. Raanana
> Israel , 43000
> Phone Numbers:
> Office: +972-(0)9-7740261
> Fax: +972-(0)9-7740261
> Mobile: +972-(0)58-888377
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Monday, March 26, 2012

Suggestion for next release of 2.0 - ValidationSummary Control

Hi Guys,

I have a feature request for 2.x or 3.x. How about we have the option
to let the ValidationSummary display messages from all validators on
the page? For instance, maybe we can have an additional property
"DisplayAllValidators."

Or maybe you can just modify the ValidationGroup property on the
summary control to work like this:
1. Undefined - Summarize all undefined Validators ignoring those with a
defined group
2. Defined - Summarize only the specified group's validators
3. All - Summarize every validator on the page (including those in user
controls)

That would be nice!

Forcing us to place multiple summary controls for each group on a page
is pretty lame. Allowing us the ability is nice...you could also just allow us to enter comma delimited Groups. I still
like my first suggestion better but at least that would solve my
problem.
re:

Quote:

Originally Posted by

I have a feature request for 2.x or 3.x.


Please submit that request at the Visual Studio
and .NET Framework Feedback page :

http://connect.microsoft.com/feedba...aspx?SiteID=210
Click on the "Submit Feedback" link and make sure you have a Microsoft Passport
handy so you can login, which is required in order to be able to submit requests and bugs.

If you don't have a Passport, get a free one here :
https://accountservices.passport.ne...?vv=410&lc=1033
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"r2thej151" <csharpdesign@.gmail.comwrote in message
news:1155851585.512982.134980@.i3g2000cwc.googlegro ups.com...

Quote:

Originally Posted by

Hi Guys,
>
I have a feature request for 2.x or 3.x. How about we have the option
to let the ValidationSummary display messages from all validators on
the page? For instance, maybe we can have an additional property
"DisplayAllValidators."
>
Or maybe you can just modify the ValidationGroup property on the
summary control to work like this:
1. Undefined - Summarize all undefined Validators ignoring those with a
defined group
2. Defined - Summarize only the specified group's validators
3. All - Summarize every validator on the page (including those in user
controls)
>
That would be nice!
>
Forcing us to place multiple summary controls for each group on a page
is pretty lame. Allowing us the ability is nice...
>


thanks for the link. it is already filed and open.

Tuesday, March 13, 2012

Switch page to SSL Programatically?

Howdy,
I'm trying to have select pages always be secure and others I don't care.
I'm using
If Request.ServerVariables("SERVER_PORT") = 80 Then
Dim strSecureURL
strSecureURL = "https://"
strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
strSecureURL = strSecureURL & Request.ServerVariables("URL")
Response.Redirect(strSecureURL)
End If
This works, but is there a better way for .net 2.0?
Thanks,
Merry Christmas
David LozziInstead of testing for the server port variable, test for the HTTPS
variable. It will return ON if it's a secure connection or OFF it is isn't.
This would avoid any issues where the server or ssl certificate is running
on a port other than 80.
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199...2006
"David Lozzi" <dlozzi@.nospam.nospam> wrote in message
news:%23VNNyktGHHA.4112@.TK2MSFTNGP04.phx.gbl...
> Howdy,
> I'm trying to have select pages always be secure and others I don't care.
> I'm using
> If Request.ServerVariables("SERVER_PORT") = 80 Then
> Dim strSecureURL
> strSecureURL = "https://"
> strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
> strSecureURL = strSecureURL & Request.ServerVariables("URL")
> Response.Redirect(strSecureURL)
> End If
>
> This works, but is there a better way for .net 2.0?
>
> Thanks,
> Merry Christmas
> David Lozzi
>
"David Lozzi" <dlozzi@.nospam.nospam> wrote in message
news:%23VNNyktGHHA.4112@.TK2MSFTNGP04.phx.gbl...

> This works, but is there a better way for .net 2.0?
http://www.codeproject.com/aspnet/W...&select=1697847

Switch page to SSL Programatically?

Howdy,

I'm trying to have select pages always be secure and others I don't care.
I'm using

If Request.ServerVariables("SERVER_PORT") = 80 Then

Dim strSecureURL

strSecureURL = "https://"

strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")

strSecureURL = strSecureURL & Request.ServerVariables("URL")

Response.Redirect(strSecureURL)

End If

This works, but is there a better way for .net 2.0?

Thanks,

Merry Christmas

David LozziInstead of testing for the server port variable, test for the HTTPS
variable. It will return ON if it's a secure connection or OFF it is isn't.
This would avoid any issues where the server or ssl certificate is running
on a port other than 80.

--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"David Lozzi" <dlozzi@.nospam.nospamwrote in message
news:%23VNNyktGHHA.4112@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

Howdy,
>
I'm trying to have select pages always be secure and others I don't care.
I'm using
>
If Request.ServerVariables("SERVER_PORT") = 80 Then
>
Dim strSecureURL
>
strSecureURL = "https://"
>
strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
>
strSecureURL = strSecureURL & Request.ServerVariables("URL")
>
Response.Redirect(strSecureURL)
>
End If
>
>
>
This works, but is there a better way for .net 2.0?
>
>
>
Thanks,
>
Merry Christmas
>
David Lozzi
>
>


"David Lozzi" <dlozzi@.nospam.nospamwrote in message
news:%23VNNyktGHHA.4112@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

This works, but is there a better way for .net 2.0?


http://www.codeproject.com/aspnet/W...&select=1697847