server request method using vb,net? [closed] - asp.net

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
how would i be able to achive something like php's
if($_SERVER['REQUEST_METHOD'] != 'POST')
using vb.net - im trying to prevent people from accessing a webpage unless they are directed there by a form post.
Thank you

The HttpRequest object has a HttpMethod property which would indicate this. This object can be accessed by the Request property available on the base Page class (so from any page).
It's worth noting that this isn't a way to "secure" a page. Anybody can make a POST request, they don't need to have been "directed there by a form."

Related

How do I append characters to current URL in the masterpage? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I would like to display the current URL the user is on, and append characters to the end of it.
So if the site they were on was google.com it would display google.com/plus.
The trouble is I would like to do it from a master page so I'm not going to know which URL they are on.
Any assistance is greatly appreciated.
Thank you!
You can use Uri.GetLeftPart Method
For example,
string authority = Request.Url.GetLeftPart(UriPartial.Scheme)
string newUrl = authority + "/plus";
using Request.Url you can know the current url the user requested.

Sql calls in code behind page [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
For now all my sql calls take place in the cs pages and its a lot of code my goal is to set a new class or whatever (i heard it is done right with dll's) that the class will store functions for every scenario i will need. So my question is how to accomplish it .. Suppose in a large scale site how it is supposed to be done?
I would suggest creating a Class Library Project, moving your shared code to those libraries, and then including those libraries in your Web Project.

ASP.net - Static site search [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
We have a static website in asp.net with about 50 pages and need to implement a site search. Any suggestions/links will be appreciated.
Thanks,
K
If you're looking for a quick way to get search functionality into your pre-existing, static, site, google site search would be a very simple route to go.
This link might help you.http://www.codeproject.com/KB/applications/SearchDotnet.aspx or you can can use sitesearch component for asp.net sites
http://www.sitesearchasp.net/
http://www.asp.net/community/control-gallery/browse.aspx?category=45
I add one more suggestion here.
The UltimateSearch from Karamasoft, that is a commercial product, but you avoid the advertise and have more control over.
http://www.karamasoft.com/UltimateSearch/Features.aspx

Fetch Contacts From yahoo using asp.net [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
how can i fetch the yahoo contacts in asp.net any source code or any reference.
Yahoo's full .net specific documentation for this stuff can be found at http://developer.yahoo.com/dotnet/
The Yahoo Contacts API
One way is to use YQL - this is a webservice, so you can simply access it as such.
OR
Read http://developer.yahoo.com/social/contacts/ and Use WebClient in ASP.NET.
You can take idea how to use API from here.

working with sitemap path in asp.net? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
can i know how to work with sitemap path in asp.net is possible examle please.
ASP.NET Site Maps
The simplest way to create a site map
is to create an XML file named
Web.sitemap that organizes the pages
in the site hierarchically. This site
map is automatically picked up by the
default site-map provider for ASP.NET.

Resources