|
Hi everyone,
I m working Web application (C# 2005).
I have one folders(Directory) in my application.it contains some sub folder(directory). i want to display these all sub folder as thumbnail view as like we have normally in explorer in our computer.
Please help me,
Best regards,
ASIF
|
|
|
|
|
Hi,
You can use repeater control and folder images to get the view u want.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi chetan,
can u show me some code,,,,
|
|
|
|
|
Hi,
Sorry you need to use datalist control instead of repeater control.
1. Put a datalist control on your page and in ItemTemplate create an Image control and set its ImageUrl property to the folder image path.
2. Use System.IO.Directory.GetDiretory(urdirectorypath) to get the directories in "urdirectorypath" and bind it to the datalist and Done!!!!!!!!!!!!!!!!!
-- modified at 4:32 Tuesday 5th June, 2007
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi all,
In my registraion page,i have to get states list based on country selection,city list based on state selection.Whenver the page is post back the password field is cleared.We are using asp.net 2.0.how to implement ajax concept for dropdownlists?Please come out me from this problem?
|
|
|
|
|
download the setup file for ajax from the site
http://ajax.asp.net
When you open the .net 2.0 you will see an additional section in the toolbar
named Ajax Extensions.
1) Drap and drop the scriptmanager control to page
2) Drap and drop the updatepanel to the page
3) Add combo box inside the updatepanel, then write the coding,
Now, only the control inside the updatepanel is refresh. so password field
will not be clear.
Note:-
The web.config file has to be modified for making it to work using ajax,
otherwise, the page will work normally i.e entire page is posted to server
The sample web.config can be got from the website or from your local machine.
|
|
|
|
|
Can i have two code behind files for a single web form?
Let us say i have WebForm1.aspx, can i have two WebForm1.aspx.cs pages or
can i have two seperate classes which act as a code behind?
How can it be implemented if the above is possible?
Gautham
|
|
|
|
|
In which condition you want to do it.
Raghvendra Kumar Roy
|
|
|
|
|
gauthee wrote: can i have two WebForm1.aspx.cs pages
Yes, because you can use a partial class
gauthee wrote: can i have two seperate classes which act as a code behind?
No, I can't imagine why you'd want to, and you cannot.
gauthee wrote: How can it be implemented if the above is possible?
If your class is called Webform1, make a new file with the same class name and put partial before the class name. The two files will be combined to make one class, all you get is the ability to partition the code between two files.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian,
Thanks for the reply!
The 'partial' concept evolved in 2.0 right! How can i achieve this in 1.1?
Now let us say i have WebForm1.aspx as stated earlier, the html code for the page would have the followinf line:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebForm1" %>
This way can i provide with one more .cs file for the same page?
Gautham
|
|
|
|
|
Hi,
I think you can not implement this in .net 1.1.
and I wonder why you want this scenario?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
gauthee wrote: How can i achieve this in 1.1?
The best you could do is to create a class derived from the page class, and derive your page from this new class. But, that's a nasty, nasty hack, to do that just to split code across two files. It won't work 100% like a partial class either ( the page will see the base methods but not vice versa ). Why do you want this ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have to save an aspx page into html page.In my asp.net page,i have two images,one map and two graphs.I am getting maps ang graphs from another page into current page and displaying using iframes.My client requirement is whenever he click the 'Save as html'in that page, the entire page has to go n save in html.Plz tell me solution for this question?
Regards,
sanjana
|
|
|
|
|
Does anyone have a solution for doing rounded corners for text boxes in ASP.NET 2?
|
|
|
|
|
Hi,
U may find answer Here[^]
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi all,
Is there any specific property or control in ASP.NET 2.0 using which i can enter only numerical characters in a textbox??
How do i do this???
If no, please semd me the piece of code using which i can do this validation.
Thanks
Ramesh
|
|
|
|
|
you can use regular expression validation like this:
""asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Numeric Value" ControlToValidate="TextBox1" ValidationExpression="[0-9]">Raghvendra Kumar Roy
|
|
|
|
|
Hi Raghav,
Thanks!
n wat do i do if i want to validate a filed called year which should accept only 4 digit year like 2007 and not 07.
also i want a textbox which should not accept special characters.
|
|
|
|
|
if you want to validate a filed called year which should accept only 4 digit year like 2007 and not 07.
try this:
After validationexpression you can define numbers Just add this for your problem
ValidationExpression="[0-9]{4}"
if you want a textbox which should not accept special characters.
it will accept only uppercase characters,lowercase characters and numeric characters.
ValidationExpression="[A-Z,a-z][0-9]"
Thanks
Raghvendra Kumar Roy
|
|
|
|
|
hey raghav......
this accepts only a single digit number!!!!
i want the field such tat it should accept number..... any number of any length.....
but this validation coontrol accepts only a single digit no.
not any other number also
please help asap.
thanks
Ramesh
|
|
|
|
|
Hey Ramesh
Try this:
ValidationExpression="[0-9]*$"
Raghvendra Kumar Roy
|
|
|
|
|
Hey Raghav,
I have been able to do it by simply adding a star
ValidationExpression="[0-9]*"
For wat is tat additional $ ?
Please let me know
|
|
|
|
|
hi Ramesh
$ means stop looking at this position.
Raghvendra Kumar Roy
|
|
|
|
|
This script is used for u accept only numbers.
<br />
<script type="javascript"><br />
function isinteg(obj){<br />
if (isNaN(obj.value)){<br />
obj.value="";<br />
return false;<br />
}<br />
return true;<br />
}<br />
</script><br />
<input type="text" name="field" onkeyup="isinteg(this);"><br />
Regards,
Satips.
|
|
|
|
|
//here formElement is the control and myString is the string typed into it .
//By using this javascripting code the characters and others will not //get //typed only numbers will type.
function removeInvalidChars(formElement, myString)
{
var intPeriod = 0
for (var i = 0; i < myString.length; i++)
{
A_char = myString.charCodeAt(i)
//We are validating for numbers.
if (A_char > 47 && A_char < 58)
{
// It's a number
continue;
}
else
{
myString = myString.substring(0,i)
}
}
formElement.value = myString;
}
|
|
|
|