|
Hi,
I'm new in ASP.NET and need some help with my problem. I need to convert some HTML tags to Microsoft Office Word 2003's XML format. Is there any built-in component from .NET that can do this?
Thanks in advance for your help.
|
|
|
|
|
All,
I am looking for a mechanism which makes use of "Forms authentication" and "Role based authorization".
Requirement is
my application should validate users belonging to different groups "Admin,guest,developer" and each group may consist of no of users.
for ex: if i(developer) logs in with my id and pwd i should be redirected to web pages that are specific to me, likewise for admin and guest too.
i am considering option of storing credentials in sessions and fetch the roles from db for access.
Is this a feasible option.
can anyone guide me?
Thanks
Mukkanti
|
|
|
|
|
Look up bitmasking, it will be of great help for you.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
hi can you be more specific plz..
Thanks
Mukkanti
|
|
|
|
|
Hello there
I'm having this registration form with 7 fields of real_name, user_name, email, password, city, webpage and signiture, I want my users to fill in this form and then after submitting the form I want to send them an activation email. my database has mentioned fields and also id (using identity) and verfy_user with default value of 0 (which means not).
2 questions are here for me:
1- how can I send activation email (simply?)
2- how can I prevent unactivate users from logging in?
your responses will be highly appriciated
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
netsooz (Amir Hamidi) wrote: 1- how can I send activation email (simply?)
Look up System.Web.Mail or System.Net.Mail.
There's loads of Smtp classes in there. And they're fairly simple.
netsooz (Amir Hamidi) wrote: 2- how can I prevent unactivate users from logging in?
Add a bit field in your users table (e.g. IsActive) and set it to true, when the user you're sending an activation email to clicks on the link in that email.
var question = (_2b || !(_2b));
|
|
|
|
|
1. First user fill the registration form.
2. User Click on the submit button.
3. On submit button click, you send him a activation mail for his account.
Now Following is my suggestion for your question.
netsooz (Amir Hamidi) wrote: 1- how can I send activation email (simply?)
Now, I will suggest, add one more filed called GUID in the DB. While sending the mail add the GUID with the corresponding user in the database and send the activation url.
Send a URL link with the email like
http://yourwebsite.com/Verification.aspx?Guid="AFDFASDFrwerwSDF@423"
Now, This GUID will ensure that, weather the user coming from the proper source or not. When user hits the URL, Read the Query String and verify the user GUID from the database. Now if its valid, then set the verfy_user filed to 1 and redirect user to Home Page.
netsooz (Amir Hamidi) wrote: 2- how can I prevent unactivate users from logging in?
During login, Check verfy_user field along with the User ID and Password. If user ID and password matched but verfy_user is still 0, then throw a message that Please activate your account.
Hope this will helps you to move ahead.
Good luck.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Good answer, but just for the record:
Abhijit Jana wrote: add one more filed called GUID
filed - as in my glass has been filed with wine [sic]
field - as in my database field is "Username"
Don't worry though. Most English people get confused with these english words which sound (and often look) the same but have different meanings.
|
|
|
|
|
Filed actually means like a paper has been filed in a filing cabinet.
Filled is filled with wine...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Yes, I confused things more. Im a douche.
|
|
|
|
|
Sorry about that.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
You simply made a spelling mistake, he even made one :P
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Yes, notice I had [sic] after the sentence. I was using filed as it sounds not as its spelt.
|
|
|
|
|
No need to be sorry Abhijit, you gacve an excellent answer I was just pointing out a possible misunderstanding of the right English word to use... It seems I confused things more using your spelling of filed to mean filled instead of filed.
I hate English. I want to speak a cooler, less obtuse, language.
|
|
|
|
|
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi all,
i am kind new to ASP.NET / C#, i wonder if is it possible to handle the Left mouse button down / up events for a given asp.net control.
In particular, i want to change the ImageUrl in a ImageButton when the user clics down on it, and then change it again when the clic up event comes, to simulate a "push down" effect on the ImageButton image.
Is it doable? How?
Thanks a lot.
|
|
|
|
|
Well I would employ javascript to do that, actually, like this:
In your code behind, add this line(in Page_Load, or wherever):
ImageButton1.Attributes.Add("onmousedown", "OnMouseDownButton()");
On your aspx page (somewhere in the head tag, or in an .js file if you have one linked, add this:
function OnMouseDownButton()
{
document.getElementById('ImageButton1').src='yourotherimage.jpg';
}
Remember to add the script tag over the actual script
|
|
|
|
|
Hi Greg,
thank you for your help. I did it as explained, and actually seems to be a problem with the image path, it seems unable to find it. The image is in a regular folder named /Recursos/Iconos/, this folder is nested directly above the solution folder.
In C#, it works fine using the prefix "~" (~/Recursos/Iconos/imageclic.png), but i don't know if it must wok the same way inside a script (inside the .aspx tag).
(excuse my poor english)
|
|
|
|
|
alvarog01 wrote: In C#, it works fine using the prefix "~" (~/Recursos/Iconos/imageclic.png), but i don't know if it must wok the same way inside a script (inside the head .aspx tag).
You have to provide the relative path to it, or the weburl itself!
So you either do ../../Recursos/Iconos/imageclic.png (or as many ../ as you need),
or www.foobar.com/Recursos/Iconos/imageclic.png.
Forget about the "~" sign. Means nothing to javascript, far as i can tell
And if it does it's beyond me ;>
And don't worry, your English is fine.
var question = (_2b || !(_2b));
|
|
|
|
|
Thanks a lot Greg, it finally worked!!
|
|
|
|
|
Hi in my machine i have installed .net framework2.0 and ajax extension...,
i am trying for updatepanel concept...,
if my controls are in inside the update panel also...,i am getting page postback,
Is there extra anything i ahve to install in my machine...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
i create a textbox1 named rno , second textbox2 named stdname and 1 Find button
i want to enter the no of the student in rno click the find button and display the name of student in textbox2
i have the maintain database in sql2000
please send me solution
My id is : sanjay_raizada@rediffmail.com
|
|
|
|
|
raizadasanju wrote: i create a textbox1 named rno , second textbox2 named stdname and 1 Find button
i want to enter the no of the student in rno click the find button and display the name of student in textbox2
i have the maintain database in sql2000
Then what is the problem. You just need to write a simple SQL Suery or a SP's which take Roll name as parameter and will return the Name from the database, then display the name in TextBox.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Since you have the records in a database then you need to query the database to get the data. With no knowledge of the database nobody can write a query for you. Your next question will probably be on how to connect to the database and display the result, so I suggest you invest in a book on ado.net and another on sql.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi I am developing one application which is registering Impressions and clicks for banner advertising site. When any flash banner runs it will call to my aspx page with some value as a Query String I will catch that parameter and add into database. Our application is running on MSN India. So it will generate huge load on our server. Recently we come to know that we are loosing impression means we are not registering all impression served by server. So I downloaded Microsoft Web Stress Tool. Site Manager and One more tools to check virtually load on the server But it is display lots of bad request like Socket error, Http error, Session Error, Request failed due to 401 response something like that. So My problem is that how can I reduced this error. If Msn pinging my server 1lac time per day I want to register 1 lac impression. I don't want to loose even single impression. Is there any solution??????
http://www.tardak.com
|
|
|
|