MVC And Custom Created URLs By Customers Like Facebook ?
Aug 18, 2010
how best to allow a user to create their own URL? Say I have a domain like, www.mydomain.com, and I want the user to be able to create a custom ending to the URL like www.mydomain.com/companyname . Then when the URL is hit it will load the data for that company. Is this done via ASP.NET MVC routing? Any other ideas? I don't want to have to do any manual setup of site after user names it - like IIS changes or routing config file changes.
View 2 Replies
Similar Messages:
Jul 20, 2010
I am working on building a custom form builder module for our customers ... and wondering if you know any good .NET code base references for this module.
Requirements:
Customer should be able to add a form field(radio button, text box, dropdown menu) and customize the values real time.
View 1 Replies
Feb 23, 2010
I want to select all the customers from "customers" table from a specific country. I write the following query but it is not working. why?
select *
From customers
where country = @country;[code]....
View 1 Replies
May 12, 2010
I have a web site built using asp.net with ugly URLs like /DisplayContent.aspx?id=789564.
I know how to migrate the database, but the Wordpress urls will be (naturally) different.
Can I simply write some mapping or do I have to include a rewrite rule for each subpage (300 pages) in .htaccess?
Should I provide a rewrite rule for each existing page that would transform a full old url to the known new url, like for example:
/DisplayContent.aspx?id=789798 -> /2010-5-10/Title-Of-The-Post
Even if I manage to migrate the URLs, the structure of the HTML for the new content will naturally be different. How does this affect SEO?
Should I run asp.net and wordpress side by side and issue the redirects from the asp.net application?
What is the most efficient solution to this kind of migration of URLs without doing PHP programming?
View 2 Replies
Jan 20, 2010
As part of a CMS, I have created a custom VirtualPathProvider which is designed to serve a single file in place of an actual file structure. I have it set up such that if a file actually exists on the server, that file will be served. If the file does not exist, the virtual content stored for that address will be served instead. This is similar to the concept of serving a website from files stored in a database, though in this case the content is stored in XML files on the server.
This setup works perfectly when a request is made to a specific page. For example, if I ask for "www.mysite.com/foobar.aspx", the content that is stored for "foobar.aspx" will be served. Further, if I ask for "www.mysite.com/subdir/foobar.aspx", the appropriate content will also be served.
The problem is this: If I ask for something like "www.mysite.com/foobar", things begin to fall apart. If the directory exists on disk (and doesn't have a configured default page in IIS, such as index.aspx), I will get a "Directory Listing Denied" error. If the directory does not exist, I'll simply get a 404 - Resource Not Found.
I've tried several things, and so far nothing I've done has made a bit of difference. It seems as though IIS is simply noting the nonexistence of a directory (or default file in an existing directory) and serving up its own error code, without ever asking my application what to do with the request. If it ever did get to the application, I would be able to solve the problem, but as it stands, I'm quite lost. Does anyone know if there is some setting in IIS that is causing this?
I've looked for every resource I can find on the subject, and am coming up empty. I know this should be possible, because I have read tutorials on serving content from both databases and ZIP files.
p.s., I am running IIS6 and .NET 3.5
View 1 Replies
Nov 16, 2010
i have a function that pulls URLs from various web resources. needless to say some are full valid URLS and some are relative as per the HTML of the page. below is my asp.net/ c# logic i derived for examining the URL and then generate a full usable URL from whats pulled from the site...
NOTE:
origianlurl is the full url of the first searched page, and relativeUrl is a url found within the searched page (it can be a full www.site.com or a /contactus.html)
private string ResolveRelativePaths(string relativeUrl, string originatingUrl)
{
if (relativeUrl.StartsWith("http") || relativeUrl.StartsWith("www"))
return relativeUrl;
if (relativeUrl.StartsWith("/"))
{
//get main url something.com
[code]...
View 1 Replies
Mar 11, 2011
I'm trying to create a simple iFrame custom tab on my fan page. I'm using the Facebook C# SDK and I need to read the signed_request value that Facebook passes to my iFrame page.
I can print the signed_request encoded value so I know its showing up, but when I try to decode it with the Facebook C# SDK I'm getting an error. I'm using .NET 4.0 and dynamics.
Here's my code:
signedRequestString contains the Request value with the signed_param passed from Facebook.
var result = FacebookSignedRequest.Parse(FacebookContext.Current.AppSecret, signedRequestString);
dynamic signedRequestJson = result.Data;
dynamic page = signedRequestJson.page;
And the error I receive:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at DecodeSignedRequest(String signedRequestString)
why I would be getting a null?
View 1 Replies
Feb 25, 2016
I want to comments and this comments users will like but with in update panel. I have problem click buton like number rising in database. But in page don't rise. Update Panel below.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:LinkButton ID="lnkbegen" data-toggle="tooltip" data-placement="bottom" title="Beğendim" runat="server" OnClick="lnkbegen_Click">
<i class="fa fa-futbol-o"></i>
[Code] .....
View 1 Replies
May 3, 2014
I want to create my own face book share link, but it's not going to take image of perticular home or not even name.Why it's behave like that?
Below is my code.
<a title="send to Facebook" href="http://www.facebook.com/sharer.php?s=s=100&p[title]=home&p[summary]=sum_my&p[url]=http%3A%2F%2Fretirementhomesworld.com.199-79-62-24.bh-plesk-web1.webhostbox.net%2Fcommunity%2Fdetails%2F99&p[images][0]=http%3A%2F%2Fretirementhomesworld.com.199-79-62-24.bh-plesk-
[code]....
View 1 Replies
Feb 3, 2010
I have a custom control that is based off the gridview control located at: here The control is basically a gridview that automatically creates a column of checkboxes that can be used to "check" individual rows in the gridview. During the gridview's "CreateColumns" event, the "checkboxcolumn" is created dynamically. The checkboxcolumn also contains another checkbox in the header that is used to "select/deselect all" checkboxes in the column. Since the gridview does not automatically remember the state of the checkboxes in the checkboxcolumn on postback, I added a method to the control called "SaveCheckBoxState" which stores the indexes of the checked rows in Viewstate, and then I modified the "OnRowDataBound" event to check the Viewstate and reset the checkboxes based on the Viewstate.
I then added a call to "SaveCheckBoxState" in the gridview's OnSorting and OnPageIndexChanging events. This works great so long as I'm sorting or changing pages. However, I need it to update the viewstate everytime someone clicks or unclicks one of the checkboxes. At this time, the checkboxes are rendered with an onclick event that calls some javascript to highlight the row, or in the case of the checkbox in the header, to select/deselect all checkboxes. I need to call the "SaveCheckBoxState" method from the javascript used by the customcontrol, or I need to find a way to modify viewstate from javascript and perform the same action as "SaveCheckBoxState".
I've tried adding the "SaveCheckBoxState" to the onclick event declaration in the checkboxes, but when run, it simply tells me that the method is undefined. It doesn't exist in the parent page, and I don't think I should have to make an event for the parent page to pass the click to. It seems to me this should be all self contained within the custom control. Does anyone know how I can acheive this? Here is the code for the gridview OnPreRender event where the onclick event of the checkbox is set:
protected override void OnPreRender(EventArgs e)
{
// Do as usual
base.OnPreRender(e);
// Adjust each data row
foreach (GridViewRow r in Rows)
{
// Get the appropriate style object for the row
TableItemStyle style = GetRowStyleFromState(r.RowState);
// Retrieve the reference to the checkbox
CheckBox cb = (CheckBox)r.FindControl(InputCheckBoxField.CheckBoxID);
// Build the ID of the checkbox in the header
string headerCheckBoxID = String.Format(CheckBoxColumHeaderID, ClientID);
// Add script code to enable selection
cb.Attributes["onclick"] = String.Format("ApplyStyle(this, '{0}', '{1}', '{2}')",
SelectedRowStyle.CssClass,
style.CssClass,
headerCheckBoxID);
// Update the style of the checkbox if checked
if (cb.Checked)
{
r.BackColor = SelectedRowStyle.BackColor;
r.ForeColor = SelectedRowStyle.ForeColor;
r.Font.Bold = SelectedRowStyle.Font.Bold;
}
else
{
r.BackColor = style.BackColor;
r.ForeColor = style.ForeColor;
r.Font.Bold = style.Font.Bold;
}
}
}
View 1 Replies
Feb 16, 2011
In my asp.net application, users are created by the administrators & those users need to log-in into the system using their own email/password or openid. So what is the best option to implement in this scenario?
I mean, as users can't register them self,do administrator required to associate each openid with the users & what kind of table structure do I need?
And do I also need the log-in interface like that of [URL] showing multiple types of authentication(default & openid from various providers)?
View 1 Replies
Sep 13, 2010
I've created some custom headers for my emails. I've used a breakpoint to see that they are being added to the collection correctly. I don't understand how to access these from the email that's generated though. I'm currently dropping the emails into a pickup directory on my local machine and viewing them with Windows Mail. I have "view all" headers checked in Windows mail but still don't see them when I open my emails in the pick up directory.
how to access the headers that I added? Below is an example of how I did it. I'm hoping to add things like name, address, phone... etc, and then have them visible in the email.
Is this even the correct use of custom headers?
[Code]....
View 1 Replies
Mar 24, 2010
I'm making a custom modal popup using a bunch divs where the programmer can set how many buttons thay want to apprear on said popup programatically using a function. It works. The only problem is that when the programmer specifies the number of buttons he/she wants it wipes out the skin information for the whole control. If I comment out the call to CreateChildControls the skin works fine, but the new buttons are not created.
In my CreateChildControls function the first thing it does is call Controls.Clear(). I assume this is what's wiping out the skin information, but it's kind of necessary to prevent controls with duplicate IDs.
View 6 Replies
Apr 6, 2010
For test purposes I have created a simple button control that extends CompositeControl. I am able to place it on the page with a <asp:Content... and the Click event Bubbles without problem from the Control.
Now, here is the problem I am facing Due to design requirement I need to read the assembly and the classname from a table and dynamically create the control and add it to the <asp:Content. And when I do that the click event will not fire! Where am I going wrong.
Here is the code in the ButtonControl.cs
namespace Reports.Web.ServerControls {
[DefaultProperty("Text")]
[ToolboxData("<{0}:ButtonControl runat=server></{0}:ButtonControl>")]
public class ButtonControl : CompositeControl {
protected override void CreateChildControls() {
Button btn = new Button();
[Code]....
View 3 Replies
Jan 29, 2010
I have a custom PagedDataSource created at page load.I have created two lin button "Next" and "Prev" to navigae the data source.I am using session to store the PDS and retrive it on each page load .I am incrementing CurrentPageIndex each time by 1 in the buttonNext click event and setting the value to the pds object.
What i am trying to do is, when the page loads, if page currently showing is last index, disable the "Next" button. The problem is, everytime I have to click "Next" one more time to make it disabled. It seems, the page does not recognize that it is the lastindex of the datasource when loading. When I click again one more time while in the last page , it is disabled.
View 5 Replies
Jul 19, 2010
I recently created a custom validation control that compares two textboxes and verifies their content. When I use this control in a detailsview I have no problems but, when an updatepanel is added the validation control no longer works.I'm using Visual Studio 2010 and .net 3.5 framework.
View 5 Replies
Jul 23, 2010
What is the best practice to apply different themes to different customers with asp.net.
View 4 Replies
Aug 18, 2012
I see that only name,group,email address we can access at facebook send button. How can i send to my facebook page wall (where i am admin) by clicking facebook send button. It's by default don't show it.
View 1 Replies
Aug 16, 2012
I need to develop a login where user can login from his facebook account. When user login first time, an auth dialog should open from facebook asking to user for access permission and than it should move to one of my page where I can retrieve user email address and first name & last name through his facebook access token. How to achieve this?
View 1 Replies
Apr 11, 2010
I created and populated a database inside Visual Studio 2008 instead of using Management Studio.I need to run the script to create the schema for users and roles.The database does not show up in ASP.NET SQL Server Setup Wizard or in Management StudioThe only databases that do show up are master, model, msdb, and tempdb
Is there anything I can do to fix this or would it be easier for me to just create a new database starting in Management Studio and then connect to it from within Visual Studio?
View 4 Replies
Sep 1, 2010
In my facebook canvas applikation, i store the access token in session. (I use ASP.NET MVC)
But i want to store the access token in a database along with the facebook user id that i can save different access tokens for different facebook users accessing my application.
So when i query the facebook user id and if it doen't return any access token, i request permissions and get the access token for that user.
How do i access the Facebook UserID for the user accessing my canvas application before doing any authentification?
View 2 Replies
May 7, 2015
i have made a gridview which contains three fields, two textboxes and one combo box. ComboBox fetchs data from table(SQL) and when a combox box triggers, data related to combo must be added in two boxes. i did this throw another button, but i want this to be trigger directly when it clicks..
View 1 Replies
Jun 2, 2010
Just looking for recommendations, we have a need to supply a chat-room for our customers. It will be small-mid scale usage, has anyone purchased any products recently that they recommend? Open to bundled, open-source, or SaaS implementations.
View 2 Replies
Dec 26, 2010
I'm trying to create a basic application, i created facebook application before but everything has been changed.
I looked every where to create a basic application, but now i'm getting mad because there isn't any working sample. Because of the changed links, facebook api changes, facebook wiki changes i couldn't find a working copy.
write a basic app that gets permission to write user name to screen in facebook developer toolkit asp.net. I looked computerbeacon.net, codeplex, and some other pages but i couldn't succeed.
Edit: I' m adding some screenshots and some codes, it will may be you to find my problem.
[code]....
View 1 Replies
May 7, 2015
I would like to know how to get the Facebook user language.
View 1 Replies