|
My 1 Vote.
Actually it would be far better and you would learn a great deal more by researching what has been suggested and properly understanding it. It may be easier for you if someone does your work for you,but its certainly not better...
Rhys
"With no power comes no responsibility"
|
|
|
|
|
I have the following classes:
namespace MyDept.MyTeam<br />
public class AnElement1 : ConfigurationElement<br />
{
namespace MyDept.MyTeam<br />
public abstract class ConfigurationElement : System.Configuration.ConfigurationElement, ICustomTypeDescriptor<br />
{
I am trying to serialize AnElement1 to an xml string format, so I make the following call to create a serializer:
XmlSerializer xmlSerializer = new<br />
XmlSerializer(typeof(MyDept.MyTeam.AnElement1));
But I get the following inner exception:
{"Types 'System.Configuration.ConfigurationElement' and MyDept.MyTeam.ConfigurationElement' both use the XML type name, 'ConfigurationElement', from namespace ''. Use XML attributes to specify a unique XML name and/or namespace for the type."}
Has anyone encountered this? I've googled a bit but couldn't find a solution that doesn't require changing either class names. I can't change the abstract class name as it is being used somewhere else and I need the behaviour of this class in my configuration elements.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
modified on Thursday, November 11, 2010 6:16 PM
|
|
|
|
|
I want to know how can I use the image control with Browse button so it's just a simple button which will invoke OpenDialog and when selecting the file then it will be shown in the image control?
|
|
|
|
|
It sin't that difficult and there are many examples available. Upload the file, assign the path to the image control.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
There is no any event of browse control which can be handled by server side. you should call the onchange event and implement javascript function and assign selected image in image control.
It's better take html control
Farogh Haider
Web developer
|
|
|
|
|
I am retrieving a formatted html from my sql server text field into asp:Literal... I want ti know how to set the wordwrap for the asp:Literal?
|
|
|
|
|
Enclose your literal in a div tag and set the width of that div.
|
|
|
|
|
No, you don't need to wrap it in a div. The literal control will be rendered as a span which you should apply appropriate CSS styles to.
From all of the responses you have given you have much to learn before giving solid advice to others.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can you please try the following code at your system?
<asp:Literal ID="myLiteral" runat="server" Text="Hello World"></asp:Literal>
Mark Nischalke wrote: The literal control will be rendered as a span
I looked at the html source generated from browser. There is no span at all. Please let me know if I am wrong.
He is talking about Literal Control not the Label Control.
Mark Nischalke wrote: From all of the responses you have given you have much to learn before giving solid advice to others.
Well, no one is perfect. Nither me nor you. We all are learning. I am just trying my best to help others by sharing my opinion/experience.
|
|
|
|
|
Yes, my mistake, I misread and thought Label
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
no problem.
|
|
|
|
|
format the html text puting a div with word-wrap:break-all style attribute.
|
|
|
|
|
Hi,
where can I find a report or lab result of a top web hosting companies? just like the PC magazine labs for IT products with comparison?
Thanks,
Jassim
|
|
|
|
|
Did you google it?
I think it is not difficult to find out.
jrahma wrote: top web hosting companies
Depends on the kind of plan you want to take. DiscountAsp.com is one of my favourate but costly.
BTW, I think it is not related to asp.net.
|
|
|
|
|
I have an ASP.NEt website and I want to know how can determine how long the website was idle (no activity from the user) and then based on that timer I want to automatically logout and redirect to default.aspx?
|
|
|
|
|
You can use session timeout in your web.config for the same.
Moreover, for automatic redirection to default page, you can use meta-refresh in your web page.
Just search "meta-refresh in html" in google. You will get a lot of examples.
|
|
|
|
|
but the automatic refresh will refresh the page with no condition.. what i want is to redirect only when the session is expired..
|
|
|
|
|
The following code in <head> section will redirect after 5 second.
<meta http-equiv="refresh" content="5;url=http://google.com">
Just change the content to (20*60 =) 1200 if your session timeout is 20 mins.
Change the url to your default.aspx
Hope this will serve your purpose.
|
|
|
|
|
That's not answering the problem as this will cause a redirect regardless of if the person has timed out their secure session or not. That'd be redirecting someone continuously to the login page for an ambiguous time period rather than say, the standard rolling expiry session cookie.
|
|
|
|
|
ASP.NET will automatically redirect the user to the login page when the session has expired. You can put some logic there to redirect back to the default page though it could get tricky determining when to redirect and when to allow login.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
I want to save the user_email and user_password in my website Session and clear it when loggin out but i wantg to know how secure it is to store passwords?
|
|
|
|
|
Why store password in Session??
Even though the password stored in session is secured, is there any need of storing password in session?
I think, storing username, user_email, etc is sufficient to validate users access internally.
Although its not a good practice to store password in session, if you need in your design, you can store it.
There is no way a user can hack your session data from http protocol unless there is a security bleach in your application.
|
|
|
|
|
Anurag Gandhi wrote: There is no way a user can hack your session data
WRONG
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You should quote the complete sentence:
"There is no way a user can hack your session data from http protocol unless there is a security bleach in your application."
Could you pls forward me the link on how can i hack session data (Session Data not Session Key).
I might be wrong, but i would love see the way we can hack session data.
|
|
|
|