|
i think should be cause my work i am doing is that i am a administrator and i am supposed to create a new user in the aspnet_users database. but i do not know how to write the source codes for it on my web service.May I know how to do it?
|
|
|
|
|
You can just execute the aspnet_Membership_CreateUser stored procedure from the database with appropriate parameters. Even if you want to add some user to a particular role then you can use aspnet_UsersInRoles table.
hope this helps. Just go through the procedure first to see whether it solves your problem and you are able to understand what it is doing. If you are going to create user on live site, TAKE BACKUP FIRST !!!!!!
For you reference here is a link from MSDN :-
http://msdn2.microsoft.com/en-us/library/aa478949.aspx[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I have managed to do create user using membership and Role provider for my web service now i need to add a new table to my aspnet_users table using membership, but i am encountering problems in that i am don't know how to use the sqlparameter having uniqueidentifier to store the info in my new table linking to aspnet_users table, may i know how?
|
|
|
|
|
|
What will you do with this service ? I mean, by logging all the keyboard strokes, for what you will use them.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I know how to write that in C-Language
using TSR(Terminate But stay Resident).
Achieving this is very easy in c-Language.
Juts 10 lines of Code that uses
getvect()
setvect()
keep()
functions.
If U have enough time
try to learn these functions,
how to create C dll(Using MS Compiler)
and how to import them in .NET using
DllImport method.
Regards,
Arun Kumar.A
|
|
|
|
|
Hi Arun,
Thanks for your reply.
Can you refer me any online documentation to learn all of these!
Best Regards,
Emran
-- modified at 9:02 Saturday 21st April, 2007
|
|
|
|
|
My code is here
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
DataObject obj = dataGridView1.GetClipboardContent();
str = obj.GetText(TextDataFormat.CommaSeparatedValue).Substring(1).Split(',');
}
private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
DataGridViewRow dgvRow = dataGridView1.Rows[0];
for (int i = 0; i < str.GetLength(0); i++)
dgvRow.Cells[i].Value = str[i];
dataGridView1.Rows.Add(dgvRow);
}
catch (Exception ex)
{
}
}
But it throws an exception "Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound"
I am very confused. Kindly help me. Thanks
It seem to be a solution or an answer.
|
|
|
|
|
try setting
editmode to EditProgrammatically in datagridview properties.
|
|
|
|
|
Does anyone know if get/set methods update continuously and therefore cause extra overhead?
I have a "Vector" struct that has x,y,x values and a Magnitude "Get" method and I noticed that when I step through the code in the VS debugger that if I hover the mouse over a Vector object whose coordinates are changing, the magnitude filed keeps updating. Is this just because it is running in debug and I have reqquested evaluation by hovering the mouse over the object, or is it really running these methods whenever a coordinate value changes?
thanks.
cb
|
|
|
|
|
cbin wrote: Is this just because it is running in debug and I have reqquested evaluation by hovering the mouse over the object
Yes.
cbin wrote: or is it really running these methods whenever a coordinate value changes?
No. A method (or property in this case) is only run when called.
|
|
|
|
|
I have a hiden datagrid and i use:
dataGridView2.CurrentCell = this.dataGridView2[0, 0];
dataGridView2.CurrentCell.Value = richTextBox1.Text;
To update the dataset and datagrid, now the problem is becuase i dont click the next line in the datagrid the data doesnt get commited or something (altough the dataset does get changed) when updating to try and save the changes in the database nothing happens.
If i unhide the datagrid and set the text in richtextbox hit save, click the second line in the datagrid and hit save again the data does get commited.
So how would i simulate clicking the next line or how do i properly set the text in the datagrid or dataset so that it does update.
Thanks.
|
|
|
|
|
How can i use the "Extraction rule" for extracting the data in a navigation control of the interface in Visual Studio Test suite?
|
|
|
|
|
I created RDL TextBoxes in code.
I used the following code to find TextBox <width> tag value.
However textbox width is too large.
How to find exact width for given string ?
float MeasureString(string stringToPaint, string fontName, int fontSize) {<br />
<br />
Font font = new Font(fontName, fontSize, FontStyle.Regular);<br />
<br />
TextFormatFlags flags = TextFormatFlags.NoPadding | <br />
TextFormatFlags.NoPrefix;<br />
<br />
value.<br />
Size proposedSize = new Size(int.MaxValue, int.MaxValue);<br />
<br />
Size size = TextRenderer.MeasureText( stringToPaint,<br />
font, proposedSize, flags);<br />
return size.Width;<br />
}
Andrus
|
|
|
|
|
|
Thank you.
I tried second method but returned strign width is too big ? What I'm doing wrong ?
int MeasureString(string stringToPaint,<br />
string fontName, int fontSize) {<br />
<br />
Font font = new Font(fontName, fontSize, FontStyle.Regular);<br />
<br />
<br />
Size proposedSize = new Size(int.MaxValue, int.MaxValue);<br />
<br />
Form f = new Form();<br />
Graphics graphics = f.CreateGraphics();<br />
<br />
return<br />
MeasureDisplayStringWidth(graphics, stringToPaint,<br />
font);
Andrus
|
|
|
|
|
The MeasureString method of hte graphics class is what you need to call.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
As you see the code in my first message I tried this:
SizeF stringSize = g.MeasureString(measureString, stringFont);
The probles is that this gives invalid (too big) width.
Andrus
|
|
|
|
|
Funny, I've used it for years, and always found it to work just fine.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you.
I created TextBox in RDLC file and used this in TextBox Width element calculation.
I marked that textbox contains border.
When I preview resulting file in MS ReportViewer in WinForms in local mode, result TextBox is too wide.
If I manually change width to smaller, textbox width becomes smaller.
So I think then the calculated width is too big.
Any idea how to fix this ?
Andrus
|
|
|
|
|
Maybe ReportViewer adds fudge factor to width.
How to string width minus fudge factor assuming that ReportViewer adds fudge factor to width ?
Andrus
|
|
|
|
|
hey all
I'm trying to reference a dll and but i cant reference it
error stating that the file couldnt be loaded, Please make sure the file is accessible, and that it is a valid assembly or com component.
please help
thanks
irperera
I@n
|
|
|
|
|
Is the dll a .NET dll? A COM dll? Or a C++ dll?
|
|
|
|
|
|
Only .NET assemblies and COM dlls can be added as references. For C/C++ dlls you have to use DllImport(P/Invoke).
Cheers,
Suresh
|
|
|
|