|
elhosseny wrote: can i loop throught the pages in my web application ?
Yes.. Directory class having options to get directories and list all files. Using this you need to build a custom algorithm which does this
|
|
|
|
|
hi all
really thx for your effort
i want to load Dropdownlist with all pages in my web applicaton
plz inform me how in details
Kareem Elhosseny
|
|
|
|
|
The only way that I can think to do this would be to use the Directory.GetFiles method to retrieve the names of all files that ended with .aspx, .html and .htm. You would need to loop through all of the directories in your application for this.
Note that this assumes that you aren't using a sitemap and you are using static content.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
dear Pete ;
exactelly thats wht i want
plz could u give me the code
i cant do that plz
Kareem Elhosseny
|
|
|
|
|
Pete, once you've done that, can you get in touch. I have loads of stuff you can do for me as well.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
And I'll stuff a broom up my ...
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am reading the contents of a file and displaying it in a lable on a web page.
There are also some special characters in the file such as :
à
é
The problem is that these chars are converted to square blocks like this � in display.
And this the the code i am using to read the file:
<br />
FileStream file = new FileStream(FilePath, FileMode.Open, FileAccess.Read);<br />
StreamReader sr = new StreamReader(file);<br />
<br />
string s = sr.ReadToEnd();<br />
<br />
sr.Close();<br />
<br />
file.Close();<br />
<br />
<br />
And this is the code whihc i am using to display the contents:
<br />
lblStaticContent.Text = s.ToString();<br />
Please help.
Deepak Surana
|
|
|
|
|
A StreamReader by default uses the utf-8 encoding. If any other encoding was used when creating the file, you have to specify that encoding when you create the StreamReader .
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I am new to .net. i have designed a website where a user has to enter username and password. i have used 2 requiredfieldvalidators 1 for the username and 1 for the password textboxes. The Validators works in Internet Explorer but it does not work in Firefox. I am using ASP.net 1.1 for the website designing. Can someone please tell me how to work it in Firefox? it is urgent for me as i have a deadline to complete.
|
|
|
|
|
Please see my answer here[^] that shows what you need to do.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello,
Does anyone know of a way to set the below authenication mode programatically?
<authentication mode="Forms">
</authentication>
Thank you for the help.
RB
|
|
|
|
|
Why would you ever want to do that?
Ben
|
|
|
|
|
If you are using .net 2.0 you could do:
System.Configuration.Configuration configuration =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
AuthenticationSection authenticationSection =
(AuthenticationSection)configuration.GetSection(
"system.web/authentication");
Ben
|
|
|
|
|
How to retrive values from datakey with multiple column
|
|
|
|
|
Is this right?
<asp:gridview id="gv_pers_result" runat="server" allowpaging="True" autogeneratecolumns="false"
="" autogeneratedeletebutton="false" autogenerateeditbutton="true" cssclass="section_infolista" datakeynames="Person_ID,eid" onrowcommand="gv_pers_result_RowCommand" width="95%" onrowediting="gv_pers_result_RowEditing" onrowcancelingedit="gv_pers_result_RowCancelingEdit" onrowupdating="gv_pers_result_RowUpdating">
==============================================================
Session["TRANSIT_PRS_ID"] = gv_pers_result.DataKeys[e.RowIndex][0];
|
|
|
|
|
Hi all...
I want to disable the browser back button. Is there anyway possible .
I heard of some meta tags but dont know how to use them .
Can anyone tell me a perfect solution to this that I can just place in the master page and it will do all the work.
Waiting in anticipation
Sam
Bye
|
|
|
|
|
There are no straight forward way of disabling back button. You can try appending
<script>history.forward()</script>
in the firstline of the page as a workaround so that when the page is back pressed, then, the browser would push it forward.
If it helps then rate me
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
i have tried this method as well but once i get the postback on the page and then click the back button, despite all the correct url the page is directed to cannot find server. I have tried this as well.
javascript:window.history.forward(1);
Now i also tried this but of no use.
Bye
|
|
|
|
|
|
dear blue boy i knw how to google
So, plz give me the answer if u knw it
thx
Bye
|
|
|
|
|
Mr.Sam wrote: knw how to google
Why you can't figure out then?!
I Love SQL
|
|
|
|
|
can anybody give me the answer...
plzzz
Bye
|
|
|
|
|
You shouldn't be able to as far as I know. One practice is to prevent the page from caching i.e. In your aspx page:
<%
Response.CacheControl = "no-cache";
Response.AppendHeader("Pragma", "no-cache");
Response.Expires = -1;
Response.Cache.SetNoStore();
%>
Some combination of these commands should stop caching. Then use the pageload event to redirect as necessary.
Good Luck.
|
|
|
|
|
Hi all,
i have developed one asp.net application and set the session timeout for 20 minutes but how i don't know
my session is timed out not correctly
means, it would be timeout in 1 minute, sometimes it take 20 minute, some time it take 10 minute
why it is ?????
please help...
any setting in Web.Config or Global.asax ??
thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
The setting is in web.config, amd set in minutes:
<sessionState
timeout="20"
/>
- but if you're running this locally on XP don't worry about it; IIS on XP has a mind of it's own, and times out whenever it gets bored and feels like it.
It should work correctly on a proper web server.
Fred
|
|
|
|