C# create folder structure and place files within folders created
I would like to accomplish the following tasks in a C#.net 2010 application:
1. start in a specified directory location.
2. check to see if a specified subfolder exists.
3. if the specified folder does not exist, create the subfolder called customer1.
4. if the subfolder called 'docs' does not exist, create that folder.
5. if the type of document type is '*.pdf' or '*.doc' place the data file in the subfolder called
'docs'.
if the document type is of any other document type, place that document in folder level where called 'customer1'.
Thus I am wondering if you can tell me and/or point me to references that will show me how to accomplish all and/or parts of the steps I would like to accomplish listed above my showing me showing me code and/or pointing me to links that will show me how to accomplish this goal?
Answers (3)
0
try jquery as below
$('#TextBox2').focus(function(){
$('#TextBox2').val($('#TextBox1').val());
});
If it helps you select it as correct answer.
Accepted 0
Sir how we will define loop in following statement :
$('#gvDetails_txtPackaging_0').blur(function () {
if ($('#gvDetails_txtPackaging_0').val() > $('#gvDetails_txtQuantity_0').val()) {
alert('Packaging number can not be greater than Quantity of product')
}
});
0
If your problem solved, then select it as correct answer. So other users with same problem no which is correct answer.
0
thank you so much sir.. :) :)
its working...
0
$('#TextBox2').blur(function(){
if($('#TextBox2').val()>$('#TextBox2').val())
{
//Give error message here
}
});
0
yeah sir exactly..
0
You mean to say when you enter value in textboxt2 right??
0
yes sir i can..
actually i want restriction that if we are enter some value in textbox1 so in textbox2 must have the value that will be less than or equal to the value of textbox1...
0
can you explain. It gives same value in textbox2
0
thank you ranjit sir its working..
but in textbox 2 i want the value which is less than or equal to textbox 1..plz give solution becoz i am new in jquery
0
hi try this:
<asp:TextBox runat="server" id="textbox1" onblur="SetTextInTextBox2()" />
<asp:TextBox runat="server" id="textbox2" onfocus="SetTextInTextBox2()" />
in javascript
- function SetTextInTextBox2()
- {
- var a=document.getElementById('textbox1').value ;
- var b= document.getElementById('textbox2').value
- if(a>0)
- {
- document.getElementById('textbox2').value = document.getElementById('textbox1').value;
- }
-
- }