MVC ::how To Change The Method To Accept More User Methods

Mar 8, 2010

I have set up the membership provider on my own database and can create people fine.I wanted to be able to add more attributes than what the method is offering me.w I would change the method to accept more? Where is it?

View 3 Replies


Similar Messages:

Web Forms :: How To Change This Methods In To Use Dictionary Or Extension Methods

Jul 23, 2010

public class CacheHelper { /// <summary> /// Removes object with the specified key. /// </summary> /// <param name="key">The key.</param> [code]....

I have this methods for caching..I need to change this methods to use in aDictionary<string,object>

How do I need to change this code Because I am new to asp.net I am still learning..

View 12 Replies

Web Forms :: Method Wont' Accept Input Form Textboxes

Jan 21, 2010

I've written a small class .That has a method for adding and subtracting.

My class file is fine and everything works well when I hard code the integer values. But the moment I try to use textboxes in my methods signature to accept values it complains that this is an inavlid argument. I assume that this is because I used int as my signatures but then how can i use my class to textboxes as input.

Class Code

[Code]....

Code behind where error occurs

[Code]....

View 1 Replies

DataSource Controls :: Change SelectParameter To Accept Datetime Sql Type?

Sep 21, 2010

If I ran my sproc from query analyzer, I get the correct results(data is filtered by datetime), i.e:

exec Uds.Dashboard_GetJobs '9/20/2010 11:01:23 PM'

However, if I ran it from the Asp.Net page, (ALL records are showed). Looking at the SQL Profiler I see the following call:

exec sp_executesql N'exec Uds.Dashboard_GetJobs',N'@date nvarchar(21)',@date=N'9/20/2010 11:01:23 PM'

Running both statements above in the query analyzer it WILL return me different results. Why? Someone mentioned that it looks like I don't have correct data type specified for SQLParameter in .Net application. I was asked to create something like:

cmd.Parameters.Add("@Date",SqlDbType.DateTime).Value =

Well, my code in the asp.net is in this form:

<asp:SqlDataSource ID="sourceRealtimeLogging" runat="server"
ConnectionString="<%$ ConnectionStrings:UctConnectionString %>"
SelectCommand="exec Uds.Dashboard_GetJobs">
<SelectParameters>
<asp:ControlParameter ControlID="UpdatedTimeUTC" Name="date" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>

So I guess I am passing a string to SQL, not a datetime type. How do I fix this? Not even sure if this is the cause of my issue but worth a try.

View 3 Replies

SQL Server :: Database Properties Column Identity Value Will Not Accept Value Change?

Sep 25, 2010

In the tutorial I am doing I have been requested to change a field in the colums properties of a table. The ID column is currentl displaying NO and NO again for "is aIdentity. I can Highlight the values but cannot change to yes. either in the properties talbe or in the properties window on the right hand side of IDE interface. How do I change that value?

View 3 Replies

Web Forms :: Execute All Methods Or None If Error Occurs In Any One Method

Jan 14, 2014

I have a method which perform following task

1.save file to a folder

2.save data to database

3.send email to client

I want if any exception occur then non of  them will work.

currently it save file  even if there is some exception in databse connection or sending email. Which make my folder heavy.

View 1 Replies

Best Practice: General Asmx Data Loading Web-method Or Multi Web-methods

Apr 3, 2011

which is better approach from performance point of view, is it better to use one web-service method to load data by passing Database Table name and keys or is it better to use separate method for each database table! knowing that i'm using .net asmx through ajax requests.it's obvious that one method is better from OO perspective since it have one function type 'data loading' but what about performance? does IIS affected by that or not? also is it better to make multi web-services 'asmx files' or just one!

View 3 Replies

Custom Server Controls :: Web User Control Doesn't Accept It's Property

May 22, 2010

[Code]....

When i add this control to a page i set it's address with Address property. But it never sets it's address property like this :

[Code]....

When i try it like above, it always set address null. So it never goes to webpage that i want. It's result in the address bar always like this :

http://localhost:4533/TarihKoruma/?Date=12.05.2010 but i want it like this :
http://localhost:4533/TarihKoruma/Events.aspx?Date=12.05.2010

View 6 Replies

Alternative For Static Method In Interface - Enforce Implementing Class-level Methods

Oct 28, 2010

I have a hierarchy in my website project as below:

[CustomControl1 - folder]
- CustomControl1.ascx
- CustomControl1.css
- CustomControl1.js

I load css and js files dynamicaly based on which controls are used on particular page. I am doing it by using following code:

[code]....

where AddLinks method adds HtmlLink controls to Page.Header with href attribute set to coresponding css and/or js file.

I would like to add Interface that would force new controls to have AddLinks method but it is impossible since it is a static method. Because my custom controls inherit from Control class I cannot use abstract class and/or virtual methods either. How can I achieve my goal?

View 1 Replies

AJAX :: Change Propery From JS. Call C# Methods From JavaScript?

Mar 20, 2010

At me is user control. I cannot change its property from JavaScript in any way(SectionName) . I can not understand in what a problem?

ratingElement = document.getElementById('ctl00_MainContent_rating_rating_RatingExtender_ClientState');
function handleStateChange() {
if (xmlHttp.readyState == 4) {

[code]...

View 8 Replies

Security :: Password Change Control Won't Accept New Password?

Aug 18, 2010

I am developing a shopping cart with asp.net and sqlexpress. I am using aspnet authentication components to create a backend page. I designed the site to let in only authorized users in.

Yesterday, I forget my password to login to backend and asked system recover my password. with recover password of the asp.net I was able to receive the temp password. I took that and logged in, of course asp.net forward me to password change component which I am having problem with.

Every time I change my password , password change shows that I was successfull but after clicking on the continiue button password change component comes back. I went to properties of password change component and entered the main default page as destination but it is not helping.

I close the IE clear the cache , even restart the machine. When I login always taking me to the password change page.

View 2 Replies

C# - Executing Methods From User Control?

Jan 12, 2010

I have a user control written in C# in a Telerik ajaxified page. I wrote a context menu using RadContextMenu and everything works fine except one of my menu items is "refresh". How can I refresh my user control from javascript? Basically it needs to some how force the TelerikAjaxManager to refresh my control.

View 2 Replies

Javascript - Is There A Way To Add Client Methods To User Controls

Jan 7, 2010

I recently discovered the client-side methods of some of the controls in the Microsoft ajax control toolkit. For instance, with the TabContainer, I can do something like this:

$find('tabsEditJob').get_tabs()[1].set_enabled(true);

without having to resort to server side code. Is there a way to do this in your own custom user controls without too much work?UPDATE: I was going to implement show and hide methods: although setting display to none would probably work just fine, they would prefer an explicit method. I know that the ajax control toolkit controls have a set_visible method. Do user controls get this too?

View 1 Replies

AJAX :: Calling Non-static Methods From A Static Method?

Jun 30, 2010

I did some research after posting. All I found was simple examples for no-layer architectures, like connecting to a database from your aspx page, so, in a corporate environment, it is unnaceptable.

I need to call a server-side method (using ASP.NET Ajax) in a 3-layer architecture.

For example, my Default.aspx contains a method LoadProducts().

[Code]....

[Code]....

This cannot change. There is no way to convert Business and Data layers to static.

How can I call the LoadProducts() method using ASP.NET Ajax?

View 2 Replies

Web Forms :: Access One User Control Methods In Another User Control?

Jul 28, 2010

I have a requirement where i need to access the methods of one user control in another user control.

View 8 Replies

Using Extension Methods In Static Methods On Extended Classes?

Aug 16, 2010

I have an extension method as follows:

public static class PageExtensions
{
public static int GetUserId(this Page targetPage)
{
var user = Membership.GetUser(targetPage.User.Identity.Name);
return (int)user.ProviderUserKey;
}
}

Now in a page I need to use this method in a static WebMethod, so I have added another 'extension method' to PageExtensions:

public static int GetUserId()
{
return (int)Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey;
}

and I call it as follows in my WebMethod: PageExtensions.GetUserId()

View 1 Replies

Method Is Only Supported If The User Name Parameter Matches The User Name In The Current Windows Identity?

Jan 30, 2011

get the below error. My application was working fine until I probably modified something, but don't know what.

Server Error in '/' Application.

Method is only supported if the user name parameter matches the user name in the current Windows Identity.

Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.Provider.ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity.]
System.Web.Security.WindowsTokenRoleProvider.GetCurrentWindowsIdentityAndCheckName(String userName) +2195661
System.Web.Security.WindowsTokenRoleProvider.GetCurrentTokenAndCheckName(String userName) +36
System.Web.Security.WindowsTokenRoleProvider.GetRolesForUser(String username) +61
System.Web.Security.RolePrincipal.IsInRole(String role) +182....

View 1 Replies

User Controls :: How To Call Web Method In User Controller

Aug 18, 2015

I have a web method which is work fine on other page but when I add it user controller it can’t call that method I will debug it means add break point but can’t call.My control are in a folder name User Control...Following my method to call the web method.

url: "UserControl/control.ascx/Savedata",

user control is folder name  and the control.ascx is my control page name and save data are my web method.

View 1 Replies

JQuery :: Textbox Change Event Method

Mar 2, 2011

i have a text box with textchanged event and autopostback=true and textchanged event which takes user to other page with textbox's chanegd value.i have applied a jquery to the textbox. when i start entering alphabets, a listofitems is show.eg:if i type the, I GET HTE HOTEL,THE MALL,THE BEACHs soon as i click on any thing(say THE HOTEL), asp.net takes me to the otherpage with only THE as text. and not THE HOTELthis is happening as the event is raised when i click on a choice which is as good as i am clicking outside of textbox. thus the asp.net working is fine.

View 3 Replies

Change Visibility Programmatically From Page_load Method?

Jun 9, 2010

gridview:

<asp:CommandField ShowDeleteButton="false" />

How to change visibility programatically from Page_load method?

View 1 Replies

Web Forms :: Force User Change Password When User Logs In First Time

Oct 11, 2012

if user login first time in application in how i promot for change password in Asp.Net C#.

View 1 Replies

Security :: Not Extending MembershipProvider Class And Putting All This Methods In Some Unique Class And Call Its Methods Then?

Sep 16, 2010

I am beginner in web applications development. I started one little project and host it on source forge "https://homoco.svn.sourceforge.net/svnroot/homoco". And I started implementing authentication in this application to learn how it works. From my experience people never use out of the box things so I want to implement this stuff alone (like in real world projects). So some questions:

1) Is there any reason to use membership out of the box? To use database table schema, stored procedures etc. that tool generate for developer. I think that this lower control over code and I decided to implement it my self. I don't know if I am right.

2) Is my approach in this demo project good or bad (if someone have time I like to do just a little code review)? I created database based on business rules. Not using database schema that membership provider require. Extend "MembershipProvider" class to satisfy my needs. Implement queries to database myself.

3) Now, this question is a little wired but I have to ask it. If we make custom Membership Provider and do sql queries alone, implement all MembershipProvider class methods ourselves, and in application use Membership.blabla() why is this approach different from not extending MembershipProvider class and putting all this methods in some unique class and call its methods then? I hope that someone understand what I ask here.

I am sorry for three questions, but I really trying to find the best way to implement this feature in my demo project like it is a real world application.

View 3 Replies

Method Of Centralising The Lines To Change The Web.configs Into A Master File

Aug 2, 2010

I am looking for a method of centralising the lines that need changing in the web.configs into a master file. I know you can do this within app.settings using the "file=" attribute of the appSettings section... but is there a way to do this with the other settings without changes to code?The connection string is another example. I could ask the developers to recode any of these variables into app.settings, but there are things suchs as these that I dont think are editable.

View 1 Replies

Web Forms :: Access "y" Master Page Methods In User Control?

Mar 30, 2010

I have lot of methids in my mastre page how do i use them in my User control? I dont want to copy paste the code

View 2 Replies

C# - How To Access User Control's Fields And Methods Without Registering The Control

Jul 21, 2010

I have a ASP.Net project that is setup in such a way that it can be dropped into any site and "just work." All the paths are relative to the current file, not relative to the "~". The paths are determined by ThePath = this.TemplateSourceDirectory;

This is working for everything expect registering a custom control that is created and added to one of the pages. I can add the control just fine with the Page.LoadControl but I cant cast it as the correct type to access anything.

How can I add a reference to the class from within the code itself?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved