|
The code you need to encrypt/decrypt your connection strings section in your web.config file looks like this:
public void EncryptConfigSection(bool bEncrypt)
{
string pathToConfigFile = "~/";
Configuration config = WebConfigurationManager.OpenWebConfiguration(pathToConfigFile);
ConfigurationSection connStrings = config.GetSection("connectionStrings");
if (true == bEncrypt)
connStrings.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
else
connStrings.SectionInformation.UnprotectSection();
config.Save();
}
Sebastian M.
|
|
|
|
|
Hi there,
.NET supplies System.Security.Cryptography namespace to do that...
<< >>
|
|
|
|
|
hi
i want to validate a Textbox which is in a webpartZone, i am able to do that when my aspx page is not inheriting from master page, but when I am using a aspx page with master page and my Textbox in side a webpartZone I am not able to valdate the text box .it through an error Unable to find control id 'TextBox1' referenced by the 'ControlToValidate' property of 'RequiredFieldValidator1' please give some .
Regards
Smruti
Smruti
|
|
|
|
|
Hello.
Do you have another "TextBox1" somewhere on your page? Perhaps in the Master page itself? If so - ASP.NET renames the controls in order to get a unique ID. It should automatically rename your RequiredFieldValidator1 reference to the control as well. But perhaps this does not happen as expected. Anyway you should go check it out. I've found the best way to debug this, is to try and rename your control to something logic eg. "txtName" - that way you ensure, that you decide the names, and not Visual Studio, because, well, it's best the other way around.
Best Regards
Soeren
|
|
|
|
|
Dear All
I want to creat a regular expression for a dropdown list
My first item in the dropdown list is "Please Select One..."
So i want to create a regular expression to validate this
i mean, i don't want to keep the dropdownlist with it's default selected value, i want to force the user to select one item
And if there is a better solution for that, please tell me about it
Thanx in advance
Best Regards
3ala2
|
|
|
|
|
Hi
you have to use requiredfieldvalidator and set the property Initialvalue = "Please Select One..."
Regards
smruti
Smruti
|
|
|
|
|
try this javascript and let me know....
function ValidateDegree(source,arguments)
{
if (document.Form1.DDLDegreeName.value == 0)
{
arguments.IsValid=false;
return false;
}
else
{
arguments.IsValid=true;
}
}
<asp:dropdownlist id="DDLDegreeName" runat="server" width="330px">
<asp:customvalidator id="CustomValidator1" runat="server" errormessage="Choose Degree" display="Dynamic"
clientvalidationfunction="ValidateDegree">
|
|
|
|
|
Thanx for the quick response
Where to put this code?
samerh wrote: ClientValidationFunction="ValidateDegree">
and what event to call the previous one?
and what if i had other valdators? would they still work fine?
Thanx again
Best Regards
3ala2
|
|
|
|
|
use custom validator with ClientValidationFunction="ValidateDegree".
It will work.
Man i need a favor on Any idea on how to encrypt password in web.config?
<asp:dropdownlist id="DDLDegreeName" runat="server" width="330px">
<asp:customvalidator id="CustomValidator1" runat="server" errormessage="Choose Degree" display="Dynamic"
="" clientvalidationfunction="ValidateDegree">
|
|
|
|
|
|
Hi all
I am developing one installation wizard. I have one issue. If i click the next button I made the current form visible = false and creating instance for the next from and showing the form. There problem I facing is, I dont know how to show the previous form by hidding the current form. Can anybody help me please....
Thanks
kesavan
kesavan
|
|
|
|
|
Why don't you put a tabcontrol on a single form, and navigate between the tabs if required. You can hide the tabs so the user won't see that you're using a tabcontrol...
|
|
|
|
|
Hi,
I am using smtpmail server in my application i have file control through which i can attach the file,after attaching if i click "Add" button that selected path was added in the following datagrid here i am facing problem if i attach 3 files after clicking 3 times "Add button" the 3attachments path was successfully added to the datagrid but the last attachement that is 3rd one is only be attached to mail but i have to concate the three paths how the concate the selected three paths can any body help me from this situation please
thanks,
Eswarattaluri
|
|
|
|
|
Create Attachment objects for each attachment and add them to the Attachments collection of the MailMessage object.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
i have a datagrid that their columns are unlimited and now i want create a crystal report form for that.if i had limited column i can desing the columns but i dont know haw many coulmns i will have and its count be in database.may be 3 or 4 or ... . do any body know what shoul i do?
|
|
|
|
|
|
Hi All,
please guide me that what is the sequence to call Data Grid Events in ASP.net ???
Pavan Pareta
|
|
|
|
|
Hi, I have a database which I am retrieving data from it to textboxes inside my website. Now i have a page which is called .. EditProfile .. this is used by the user in order to edit his profile. How can i edit that row of database without delete the row? thanks for any help.
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
You can use update statement for that purpose. syntax:
UPDATE STATISTICS table | view
[
{
{ index | statistics_name }
| ( { index |statistics_name } [ ,...n ] )
}
]
[ WITH
[
[ FULLSCAN ]
| SAMPLE number { PERCENT | ROWS } ]
| RESAMPLE
| <update_stats_stream_option> [ ,...n ]
]
[ [ , ] [ ALL | COLUMNS | INDEX ]
[ [ , ] NORECOMPUTE ]
] ;
Best Regards,
Apurva Kaushal
|
|
|
|
|
ADY007 wrote: How can i edit that row of database without delete the row
With an UPDATE statement instead of a DELETE statement.
|
|
|
|
|
hi,
i got a gridview to display data, and i wanna filter these data.
the GridView does not have a query from the query builder where you can click the 'WHERE' and specify some filtering there. It has a custom sql, in fact, it has a stored procedure that someone else has made.
when i run the page the stored procedure is called normaly and i get data. but, how do i filter these data???
moreover, even if the data is displayed ok, the 'Me.GridView1.Columns.Count' always gives me 0! why is this?
also, by calling the stored procedure, i get the names of the columns named automaticaly. is there any way to change this and put the names i want? maybe i could do that if i was getting some columns, but i always get 'Me.GridView1.Columns.Count = 0'
thank you in advance for your help.
|
|
|
|
|
Hi
I have deploy two web applications on windows 2003 server, one of them is running on asp.net 1.1 and other is running on asp.net 2.0.
The problem is whenever i start asp.net 1.1 application the asp.net 2.0 application is not working and if i strat asp.net 2.0 application the asp.net 1.1 application is not working, following error appears
"Server Application unavailabe"
Any idea please.
Know Yourself Then Grow Yourself.
|
|
|
|
|
|
Thanks
Know Yourself Then Grow Yourself.
|
|
|
|
|
Hi friends,
Please tell me the difference between output cache and data cache and which option best describes the diff b/w these.
1)Output cache is a temporary cache; ASP.NET cache is a permanent cache.
2) Output cache is a remote output cache; ASP.NET cache is a local cache.
3) Output cache is a cache of dynamic responses generated by page requests; ASP.NET cache is a cache of arbitrary objects added programmatically.
4) Output cache is a cache of objects and values that you reuse in an application; ASP.NET is a cache of session-level pages.
5) Output cache is an application-level cache; ASP.NET cache is a session-level cache.
Thanks in Advance,
Regards
Prya
|
|
|
|