.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How to assign default value when user registers

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Hi, so I'm using the logon function of the default MVC 3 layout. Is it possible that when a user registers a new account on the site, it will have additional data written with it? I've added a new column named uPermission to the table. How do I write a default value, like "Pending", to uPermission when the account is being entered into the database?

View Complete Post

More Related Resource Links

When the user want click on document library that should be navigate default view



I have document library which is having folders,the document library i have displayed as tree view in the left side of the page.

Here Document library having views,suppose i have selected one view on the document library it is navigating the particular view that is good but when i am trying to click document library folder still the page in same view do not navigate the default view .

I need when ever i click on any of the folder in document library that should navigate defualt view ,could you please help me on this.

Really its need urgent...


Is there a way to assign a "USER FRIENDLY" name to an "ASSIGNED TO" TASK List?

I'm starting to develop simple TASK lists, to assign tasks to a team.  Unfortunately, I'm finding that the ASSIGNED TO field wants to populate user names with a NETWORK-Style name (i.e.,  mycompany.com\jsmith  ), instead of a preferred user name (i.e., John Smith).  The descriptive user name DOES show up for a few users, but not most. I figure that there must be something buried in some user roles/permissions, at some level - but I am still having problems with navigating around the Sharepoint neighborhood to find the options that I want (if they exist). I'd very much appreciate assistance with something that could, I hope, be rather simple. Thanks,

display default image when user not uplaoding iamge ...


iam  new to asp.net ...i have stuck here ..and i need help in this..code or anything would help...

i want to show default image in gridview when user is not uploading the image...!! i knw the concept but how to implemnt using code in vb.net. i know to store th eimag ein binary format and retrieve it but how to check it for null and display the deafault image if user not uploading the image. ...please help me out in this..

my code is here: how to insert  null value to image and display default image?

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim arrcontent As Byte()
        Dim LEN As Integer
        Dim FN As String = String.Empty
        Dim EXT As String = String.Empty

        If Fu1.HasFile Then

            FN = Fu1.PostedFile.FileName
            Dim ityp = Fu1.PostedFile.ContentType
            Len = Convert.ToInt32(Fu1.PostedFile.InputStream.Length)
            EXT = FN.Substring(FN.LastIndexOf("."))
            EXT = EXT.ToLower()
            If EXT = ".jpg" Or EXT = ".bmp" Or EXT = ".gif" Or EXT = ".png" Or EXT = ".jpeg" Then
                ReDim arrcontent(Len)
                Fu1.PostedFile.InputStream.Read(arrcontent, 0, Len)
                If INSTAB(TB1.Tex

default asp.net profile when user is created


How do i set the default profile when a user logs in. I have an application where the users (once they are authenticated) are in either the logged in, premium, or promotion profile. right now it assigns none. How do i make every user automatically be part of the promotion profile.

Setting the default value of one row based on the value entered by the user in another row in the Re

Hello Everybody,
I have designed an InfoPath form where I have 4 columns (Question, Answer, Score, and Comments) in a repeating table. I have added 10 rows in the repeating table by going to Tools --> Default Values. Answer is a radio button with choices of Yes, No and N/A. When a user is filling out the form, is it possible to set the answer of one or more related questions to "N/A" and make them read only (the user shouldn't be allowed to select the answer for these questions) depending upon the answer of another question? Please let me know how to go about doing this.

Thanks in advance for your help!!

How to assign the first workflow step to the user launching the workflow


I need to be able to launch a workflow and have the first step assigned to the CurrentUser. The workflow user list only takes named users.

I cannot user Visual Studio since I need to allow the user to add or change workflow tasks members

Setup default user that cant be modified


We are using membership and roles.. is there anyway to setup a user that cannot be deleted? We need to setup a default admin account and dont want it displayed in list of user to modify, or if it has to be displayed, it cant be deleted or edited thru the pages that is, if they need to, they can do it thru the website admin section to manage it.



assign default value to dynamic data field



I have the script below and I want to apply a default value to the DynamicField StudentId (please see line in bold) below. Can anyone tell me how to do so?




        <asp:GridView ID="GridViewGuardians"  runat="server" SelectedIndex="1"
            AutoGenerateColumns="false" DataKeyNames="StudentGuardianId" DataSourceID="LinqDataSourceGuardians" ShowHeader="true" ShowFooter="True">
                   <asp:LinkButton  ID="lbInsertGuardianG" runat="server" CommandName="Insert" ValidateionGroup="addValidationGuardian" OnClick="lbInsertGuardianG_Click" >Insert</asp:LinkButton>

How to assign a initial default value on INSERT PAGE


Hi, I'm learning Dynamic Data right now, and I'm stuck with this problem.

I have 2 tables in a database; Doctors and Specialties. I'm using ASP.NET Dynamic Data Website to handle these data.

For Doctor table, I don't have Identity property on doctor_ID column. So when I want to insert a new doctor, I want my INSERT PAGE automatically generate a new ID by checking the last ID and then being increased by one. I know how to get this.

But, my question is, how to assign this new doctor ID value to the appropriate field on Doctor Insert Page only when I open it to add new doctor?

It won't be applied on Specialties Insert Page. Thanks.

assign different asp pages to users with different user types (database used is ms access)



hello.. i'm a bit stuck with my project and i hope anyone out there could lend a hand.. im completely new to asp.net so please bear with me.. =)

i have a table in ms access where i have username, password and usertype.. i wanted to use that table so that when i log in, the user with the "admin" usertype will go to the admin page while the user with the "user" usertype will go to the members page.. i can log in so the only issue is how to redirect them to their respective pages.. any help would be appreciated.. =)

Collect user info, assign temporary password and login later



Hi everybody,


We need to create  a Contact form on the website with the fields such as 'First Name', 'Last Name', 'e-mail address',  'Message Text', etc., that a user could contact us sending questions, etc.


Then we'd contact a user to discuss the possibility to be a member (purchase a product/service). So, we don't want to provide the ability for the user to create a login and a password through the asp login control. We want to send him a temporary password and login later after we decide he/she can be a member. The user login can be the user's e-mail address.


The questions are:

  1. Should we send the user information to the asp profile right from the first user contact info submission? Can we do this as the user won't have a password? Or we need to create a separate db table for it?
  2. Can we have a hidden field on a profile the administrator could see if the user is a member or just a new user? Or we could see it through Roles with the link to profile later when we make the user a member?
  3. How we could assign a temporary password to a user when we make them  a member? Probably, we could use their login (e-mail address) and do the registration from the asp Registration control entering the temporary password ourselves then sending some automatic e-mail to adv

How can I provide the user with the option to select or default their time zone when rendering a cal

Dallas-based and Tokyo-based users both have contributor access to a shared site calendar. Tokyo users would like to view their calendar items based on their time zone and Dallas would like to see the calendar items based on Dallas time zone. When a Tokyo user enters an event on the calendar their time, e.g. Sunday 11/28/10 holiday, it shows as a Monday, 11/29/10 holiday. The MOSS 2007 Enterprise w/ WSS 3.0 servers reside in Dallas. What options do we have to render the time zone based on user view or accurately reflect the date of the event for the originating time zone?

Can you change the default schema from dbo to the user's schema


In SQL server 2008 - there are multiple users set up with their own schema under a common database. Currently the users are set up with dbo as their default schema. Since DBA has not given write access to the users to write to dbo schema, users have to write their t-sql se create table schemaname.tablename  instead of create table tablename.

Can you make the user schema as their default schema. If yes then will a sql like create table table1 work (with out prefixing the schemaname). I could have tried but don't have the access to change the default schema for an user (not a dba)


IIS user (Default application pool) can not access default.aspx



we just migrated our website to a new server, and we keep getting error 401.3


and we keep getting an error

HTTP Error 401.3 - Unauthorized

You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.


I have a screen shot  of our process monitor that i am attatching, Can someone please help me?




redirects to default page if user doesn't have appropriate role


Hi All,


How to redirects to default page if user doesn't have appropriate role in particular forms Using Asp.net authentication.


Thanks in Advance


Site Administrator cannot assign user or group to pictures library or to any library permissions pag



        I have number of Mysites and in each mysites i have given same user has site administrator. I observe that in few Mysites, Site administrator user, though got full control permission, cannot assign users or groups to picture library or any library in the library permissions page. We see only few options in tool bar of the library (i.e no UPLOAD menu etc) where as in other mysite for the same user we can do what ever we want to.

         Would anybody please let me know what the cause for this behavior?


Chegondi Rama


SharePoint Foundation - Workflow user has tasks assigned then leaves the company - How to assign to


Hi all,

if a user leaves the company and has workflow tasks pending whats the best practice for assigning them to another user without terminating the workflow.

I have tried renaming the account which allows the user to continue even though the tasks still display the original username.

I guess there are a couple of questions that arise from this.

1. Using SharePoint 2010 Foundation the SharePoint user accounts don't seem to re-sync automatically with AD after a rename, so how can this be done?

2. If we decide to create a new user, how do we assign the new user account to replace the leaver in the workflow without disrupting the flow?

Thanks for any help, can't find anything on the web about this.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend