|
Hi!
I'm currently working on a project that need to generate my own user id.
But aspnetdb only provide GUID for users, it's unnecessary for me, together with application id.
I just wonder if there is a possible way to modify the schema of aspnet_Users?
If so, I won't need to code my own Membership provider for it's time consuming and I just want such a little change.
|
|
|
|
|
quakertistar wrote: I just wonder if there is a possible way to modify the schema of aspnet_Users?
I don't think this is a good idea. The default SqlProvider uses GUIDs as the primary key for user accounts. You could try changing the schema and any associated stored procedures, but there will be stuff in the Framework classes that expects to interact with GUID values.
If you absolutely don't want to use GUIDs, you should write your own provider. However, is it such a big deal for UserIDs to be GUIDs? Writing your own provider would be quite a big undertaking, so it's probably better to make do with the default provider.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks for your rely!
In my project, application id and guid is kind of redundant data. According to our design, user id must follow some rules and has its meaning.
But I know using default provider would be great, so I just want to know if there is a better choice for my request.
Thank you again.
|
|
|
|
|
quakertistar wrote: In my project, application id and guid is kind of redundant data. According to our design, user id must follow some rules and has its meaning.
The ApplicationID property exists so that membership information for multiple systems can be stored in the same database. You only need to set this once, in your Membership provider configuration section in web.config.
Are you confusing the purpose of UserID and Username? UserID serves as an internal unique identifier for a user account and would not typically be exposed to the user. From a system point of view it just needs to be unique, so using a GUID is as good a choice as any other data type. The user interacts with the system using their Username. If you want a user's username to follow some set of rules then you could write code to facilitate this.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Nah, I didn't confuse GUID with UserName. I mean we create our own rule of UserId.
I found that using custom membership provider is the only way to this, so I guess I have to give up using our own rule.
Instead, I'll try to make GUID more compatible in our system. Thank you anyway.
|
|
|
|
|
Hi all,
I'm designing a web site with asp.net with C#.
i have a problem with my profile.
i defined for example in web.config this code:add name="name"
and in webpage.aspx :
<asp:textbox id="txtName" runat="server">;
now i want to write this code in webpage.aspx.cs:
protected void btnChangeinfo_Click(object sender, EventArgs e)
{
Profile.name = txtName.text;
}
but txtName isn't recognizable for my code ,it means it has this error:
The name 'txtName' does not exist in the current context
what do i do now?
please help me...
thank you,
Hoda
|
|
|
|
|
be sure if u have textbox control named txtName .
I Love SQL
|
|
|
|
|
Thank you,
but i'm sure that i defined txtName.
|
|
|
|
|
saba02 wrote: what do i do now?
You establish why it is that you think you have a textbox, and the compiler disagrees. Odds are close to zero that the button click event is on a page that has a control of that name.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
when you declared name="name" in web.con fig it act as run time parameter.
here you assign this to your textbox properties.
pls see your textbox properties: id,name,size,this are all free defiend properties.
when you try: all redy You assign textbox name:txtName.
again your reasign with txtbox property. so try to change the name in web.config.
i sure you get result
|
|
|
|
|
how about posting your code, and your exact error message so we can look at your problem instead of having to guess ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi I have a problem regarding divs. I created a javascript function to change the position of a div. The problem is that this div is in another div and the function is not effective. I tried this function on other divs and worked but when the divs are in another div it does not work. Can someone tell me how make the function work for this div please?. I thank you infront. The function is the one below.
function gotoposition(xpos,ypos,div1)
{
e=document.getElementById(div1);
e.style.left = xpos +'px';
e.style.top = ypos + 'px';
}
|
|
|
|
|
Your question has nothing to do with ASP.NET.
Web development questions should be posted in the web development forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
True - but I'd tend to be forgiving, the web dev forum is a ghost town, and this is obviously a question that's come up using ASP.NET. A lot of people have trouble working out where ASP.NET ends and web dev begins.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I would imagine that the position of the inner div is constrained by the outer div.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hai,
i m using ASP.NET with C# (.net 2005, 2.0 framework)
here i have a datagrid which contains 10 columns.
the 4,5,8 column contains date in the format (7/23/2007 12:00:00 AM). i want to change those date in (23-Jul-2007). the major key point in this is....
1. Fields are dynamic, so i cant fix in DATABOUNDCOLUMN
2. The placement should be the same (i.e, 4,5,8 columns)
3. The data are filled to datagrid from SQL Server.
How to achieve it? help me...... - KARAN
|
|
|
|
|
Hi can acheive that in two ways.
John Sundar wrote: i want to change those date in (23-Jul-2007).
1) while writing query to retriew data from SQL server you need to use convert function.
eg: select convert(varchar,DateColumn,105) from tablename
2) In databound of datagrid coloum u can foramt.
Regards,
Sandeep Kumar.V
|
|
|
|
|
Thanks sandeep kumar.V
but the thing i need is "DD-MMM-YYYY" (this exact format).
and also i need the alias name also... my exact query.....
select convert(varchar,column1 as "Test column",106) from tbl_name
how to achieve it?????
|
|
|
|
|
John Sundar wrote: select convert(varchar,column1 as "Test column",106) from tbl_name
the query is not correct.....
select convert(varchar,column1,106) as "Test column" from tbl_name
Regards,
Sandeep Kumar.V
|
|
|
|
|
Thanks a lot sandeep... i achieved 90% of my requirement.
but i cant get the separator (any separator is OKAY)
the output is "25 Jan 2007". my requirement is "25-Jan-2007".
is there anyway to achieve it?, so that my requirement will get fulfilled 100%
modified on Saturday, April 12, 2008 3:12 AM
|
|
|
|
|
Hi.....
I think there is no formatter to format like that......
in dotnet you can acheive that.....like.....
eg:
<asp:BoundField DataFormatString="{0:dd-MMM-yyyy}" DataField="ShippedDate"<br />
HeaderText="Shipped Date" />
Regards,
Sandeep Kumar.V
|
|
|
|
|
Thanks a lot sandeep... nice to meet you.........
|
|
|
|
|
I found the answer in query itself sandeep... just refer it
SELECT REPLACE(CONVERT(VARCHAR, column_name, 106), ' ', '-') as "column 1" from tbl_name
Take care...
|
|
|
|
|
hai,
i m using ASP.NET with C# (.net 2005, 2.0 framework)
here i create a directory named "A" and some files are in this folder (say... A1,A2).
and outside of "A" folder there are some files (out1,out2).
how can i specify the path to fetch the file from A1 to out1???
how to achieve it?
help me - KARAN
|
|
|
|
|
hi....
you can achieve that by using namespaces.
Give same namespace for all the pages that u want to access.
Regards,
Sandeep Kumar.V
|
|
|
|