|
Did you gone through the link that I have Provided to you ? Check the last post of that thread. I have given a link to how to do it .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Hi all,
I am doing validations for text box and i want to check that it allows to enter the alphabets,spaces.so for alphabets we write the exp as [a-zA-Z] but for space(space bar) how should i do it ?
Thanks in advance...
|
|
|
|
|
|
I have a treeview control in that I use as a navigation control within a master page. The nodes for this control are loaded from a database which contains the text and url of each like and the hierarchy treeview.
Is there any simple method of maintaining the expanded / collapsed state of each node as my application moves from page to page/postbacks? this is on a master page used by numerous content pages.
I am looking for something obvious that I might be missing.
Thanks
|
|
|
|
|
Try putting it in an updatepanel
|
|
|
|
|
thanks for ur help. i tried but its not working...
|
|
|
|
|
How to make Plugins in asp.net? Please Help me...
Thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Piyush Vardhan Singh wrote: How to make Plugins in asp.net?
What kind of plugins do you want to developed ? Why in asp.net ?
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
i have 2-3 dll. so i want to deploy that dll when page is load like plugins
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hi All..Need help in drag and drop... I have to drag an image from a div and drop in another div....
|
|
|
|
|
Hi,
I am having problem when i try to encrypt my connection strings in the web.config file. Error: An error occured loading a configuration file: Failed to map the path '/'
My connection strings as below:
<connectionStrings>
<add name="Database_MARISConnectionString" connectionString="Data Source=MEXTERMSC;Initial Catalog=Database_MARIS;User ID=test;Password=test1234"
providerName="System.Data.SqlClient" />
</connectionStrings>
My code for encrypt and decrypt connectionstrings:
Imports System.Configuration
Imports System.Web.Security
Imports System.Web.Configuration
Imports Msecurity
Partial Class mARIS_Default3
Inherits System.Web.UI.Page
Public tmprptno As String
Protected Sub page_load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
End Sub
Private provider As String = "RSAProtectedConfigurationProvider"
Private section As String = "connectionStrings"
Protected Sub btnEncrypt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEncrypt.Click
Try
Dim conf As Configuration = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath)
Dim confStrSect As ConfigurationSection = conf.GetSection(section)
If Not confStrSect Is Nothing Then
confStrSect.SectionInformation.ProtectSection(provider)
conf.Save()
End If
'the encrypted section is automatically decrypted!!
Response.Write("Configuration Section " & " <b>" & WebConfigurationManager.ConnectionStrings("Database_MARISConnectionString").ConnectionString & "</b>" & " is automatically decrypted")
Catch ex As Exception
UpdateEvent("Configuration Manager:Encrypt:" & ex.Message)
ex = Nothing
End Try
End Sub
Protected Sub btnDecrypt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDecrypt.Click
Try
Dim conf As Configuration = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath)
Dim confStrSect As ConfigurationSection = conf.GetSection(section)
If Not confStrSect Is Nothing AndAlso confStrSect.SectionInformation.IsProtected Then
confStrSect.SectionInformation.UnprotectSection()
conf.Save()
End If
Catch ex As Exception
UpdateEvent("Configuration Manager:Decrypt:" & ex.Message)
ex = Nothing
End Try
End Sub
End Class
The encrypt and decrypt code i get from Programmatically Encrypt and Decrypt Configuration Sections in web.config using ASP.NET 2.0 & ASP.NET 3.5[^]">
|
|
|
|
|
Hey guys,
As the title says, how do I read a file name located in a specific folder into a C# application.
Basically someone will be downloading a file from a website, once the file is downloaded to a particular folder (lets say /VisualStudio2008/Projects/MyProject/bin/Debug/TheDownloadedFile.csv)
then I need to have the name of the file read into my app?
To get to that particular folder, I'm doing system.AppDomain.CurrentDomain.BaseDirectory to get to the actual directory where the file is downloaded to, how to I grab the name of the file and extension from there. I guess the extension could be hard coded once the name of the file is detected and read into the program becaseue it will always be a csv file.
Can someone please help.
Thanks
Tina
|
|
|
|
|
Just an FYI, I tried the GetFiles mehtod of the Directory class, it seems to be working fine for now.
Tina
|
|
|
|
|
Hi All,
I have a muti-select listbox on my web form. When you scroll down to select items and SelectIndexChanged event fires, the postback brings the listbox back to the top of the screen. The item is still selected, but you have to scroll down to see it. How do I get the listbox to show one of the currently selected items.
Below is the my code..
aspx page
]]>
<asp:panel id="PanelContent5" runat="server" skinid="cpanelcontent" width="99.7%" xmlns:asp="#unknown">
<asp:updatepanel id="updpanelComparisonHospital" runat="server" updatemode="Conditional">
<triggers><asp:asyncpostbacktrigger controlid="cmdCustomList">
<contenttemplate>
<asp:listbox id="cmdCustomList" runat="server" selectionmode="Multiple" height="70px">
AutoPostBack="true" Width="150px" OnSelectedIndexChanged="cmdCustomList_SelectedInde xChanged">
client script
fuction CustomSelect()
{
Var SMIndex = document.getElementById('ctl00_ContentPlaceHolder1 _cmdCustomList');
for(var index = 0; index < SMIndex.options.length; index++)
{
if (SMIndex.options[index].selected) {
SMIndex.options[index].selected = true;
}
}
}
Code behind
protected void cmdCustomList_SelectedIndexChanged(object sender, EventArgs e)
int cntSelected = 0;
string scriptBlock = "CustomSelect();";
try
{
if (cmdCustomList.SelectedIndex > -1)
{
for (int indx = 0; indx<cmdcustomlist.items.count;>{
if (cmdCustomList.Items[indx].Selected == true)
{
values = values + "," + cmdCustomList.Items[indx].Value;
cntSelected++;
}
}
Session["lstCompHosp"] = values;
if (chkComparisonExcludeOnly.Checked == false)
{
if (cntSelected == cmdCustomList.Items.Count)
scriptBlock = "cmdAllAvailHosp();" // Another Client side function
}
updpanelComparisonHospital.Update();
ScriptManager.RegisterStartupScript(this, typeof(DefaultView), "cmdCustom", scriptBlock, true);
}
}
catch (Exception ex)
{
throw new Exception(ex.Message, ex);
}
}
Would you please give some directions.
Thanks
Rao
Thanks & Regards
Rao
|
|
|
|
|
|
Hi all,
I have a text box that contains a hyperlink e.g. http://www.mysite.com.
Is it possible to get that hyperlink to work so when a user clicks on it brings up this website?.It may be a simple question.Please Help.
Thanks a lot.
|
|
|
|
|
Out of the box it is not possible. If you need this functionality you'd have to create your own control, though I can't see a need to do so.
only two letters away from being an asset
|
|
|
|
|
Hi,
I have tried with a simple html page with a textbox control. On entering some url, and hitting on "Enter" key, a new window will open with the given url. Please check this will be useful for you.
Sample Data:
http:\\www.google.com
Code:
<html>
<head>
<title>Hypherlink in a textbox</title>
</head>
<body>
<script language="javascript">
function ShowWindow(e,tstinput)
{
if(e.keyCode == 13)
{
if(tstinput.value !='')
{
window.open(tstinput.value);
return null;
}
}
return e.keyValue;
}
</script>
<input type="input" style="text-decoration:underline;" onkeypress="return ShowWindow(event,this)" />
</body>
</html>
Regards,
Rajdev KR
|
|
|
|
|
I am a student with a project that as to do with online money transaction and the main aim is to create a secure website
that can track fraud transaction and a means of securing every bit of the website information secure from being hacked.
The base of this project is all about programming/websites/security etc i have some step that i think i should take but i
really need your view and comment and various measns to assure me that at the end of the project the website security
will be secure against hacker
1. i intent traping the using ip address and store it then when the using using another computer different from the
previous one i could send a pin to the mail of the real owner of the account for account verification
2. The uses of captcha techque to seperate human and robust access
3. Account alert with the use of sms
4. Encrpting the database info
And what are your possible contribution on these project of mine
pls do tell me other means that will be helpful to secure my site and database from been hacked or away that any harm
could not be done on the site. Any contribution will be greatly appreciated
|
|
|
|
|
atplerry wrote: end of the project the website security will be secure against hacker
Good luck with that. The best and brightest have been struggling with this for years and haven't managed to attain it. The most secure website would be on a local system that is not connected to any network at all.
The methods you have outlined seem like a reasonable attempt.
only two letters away from being an asset
|
|
|
|
|
Thank you very mush for the comment you have made it really have a lot of reasoning to my thinking but not withstanding i still need a lot of contribution that will really aid my improvement from you all!
|
|
|
|
|
I encountered this issue at one of my web sites. The web.config is automatically re-saved by itself frequently. No settings have been changed but the date modified keeps increasing. As a result, the site lose its session state frequently. Does anyone know why? Appreciate your help. Thanks,
TOMZ_KV
|
|
|
|
|
Sounds like you need to set up a profiler and watch web.config...see whats touching it. It shouldn't change very frequently in normal situations.
|
|
|
|
|
Hi all,
I am researching for third party components suite for Asp.net Ajax and I would like very much to hear your opinions about your exeperiences. I tried some like ComponentArt or Telerik and both are nice, but I would like to hear the opinion from someone that already used a set of components like this.
Thanks,
lotuzwine
|
|
|
|
|
Telerik FTW!
They are awesome. I have been using them for 2 years now and they get better with every update. And they update them every quarter. Their support is fantastic. The RadComboBox, RadGrid and RadWindow are my favorites.
I didn't get any requirements for the signature
|
|
|
|