Click here to Skip to main content
15,890,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHello frameset problem?? Pin
Amr M. K.12-Apr-07 2:55
Amr M. K.12-Apr-07 2:55 
QuestionAccess file in the client machine Pin
sivainfo12-Apr-07 2:41
sivainfo12-Apr-07 2:41 
AnswerRe: Access file in the client machine Pin
kubben12-Apr-07 4:34
kubben12-Apr-07 4:34 
GeneralRe: Access file in the client machine Pin
sivainfo12-Apr-07 17:46
sivainfo12-Apr-07 17:46 
GeneralRe: Access file in the client machine Pin
kubben13-Apr-07 1:50
kubben13-Apr-07 1:50 
QuestionIt's urget please help me with this code Pin
Oga M12-Apr-07 2:12
Oga M12-Apr-07 2:12 
QuestionURLRewriting of a Pathname like (www.myspace.com/[username]) Pin
Succodimele12-Apr-07 2:10
Succodimele12-Apr-07 2:10 
AnswerRe: URLRewriting of a Pathname like (www.myspace.com/[username]) Pin
e2canoe12-Apr-07 4:50
e2canoe12-Apr-07 4:50 
No part of the path needs to exist (except for the domain of course). Here's some code from a URLRewriter I wrote recently (it sets UICulture based on a url) that hopefully gives you enough hints on how to do this. If you still have questions, send me an email at support [at] stratelogics [dot] com and I'll help you out.

<code>
public class URLRewriterHttpModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
}

public void Dispose()
{
// TO DO: Dispose resource if required
}

private void context_BeginRequest(object sender, EventArgs e)
{
HttpRequest request = ((HttpApplication)sender).Request;
HttpContext context = ((HttpApplication)sender).Context;
string applicationPath = request.ApplicationPath;
if (applicationPath == "/")
{
applicationPath = string.Empty;
}
string requestPath = request.Url.AbsolutePath.Substring(applicationPath.Length);
LoadCulture(ref requestPath);
context.RewritePath(applicationPath + requestPath);
}

private void LoadCulture(ref string path)
{
if (path.Contains("_e.aspx"))
{
// Set culture to English and remove _e from filename
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-CA");
path = path.Replace("_e.aspx", ".aspx");
}
else
{
if (path.Contains("_f.aspx"))
{
// Set culture to French and remove _f from filename
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-CA");
path = path.Replace("_f.aspx", ".aspx");
}
else
{
// Leave culture as is and don't modify filename
}
}
// Set the UICulture to match the Culture
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
}
}
</code>

Dont forget to put this in your web.config's system.web section:

<httpModules>
<add name="URLRewriterHttpModule" type="URLRewriterHttpModule, App_Code"/>
</httpModules>

GeneralRe: URLRewriting of a Pathname like (www.myspace.com/[username]) Pin
Succodimele15-Apr-07 20:54
Succodimele15-Apr-07 20:54 
Questioni want code for crating dynamic check boxes in panel. and i need to store the id's of checked when i click submit button. Pin
haneef112-Apr-07 1:24
haneef112-Apr-07 1:24 
QuestionI will created dynamic check boxes in panel but it losing the checked values when i reloads Pin
haneef112-Apr-07 1:19
haneef112-Apr-07 1:19 
AnswerRe: I will created dynamic check boxes in panel but it losing the checked values when i reloads Pin
Naveed Kamboh12-Apr-07 3:27
Naveed Kamboh12-Apr-07 3:27 
Questionurgent Pin
Shuaib wasif khan12-Apr-07 1:00
Shuaib wasif khan12-Apr-07 1:00 
AnswerRe: urgent Pin
gauthee12-Apr-07 1:08
gauthee12-Apr-07 1:08 
AnswerRe: urgent Pin
enjoycrack12-Apr-07 2:27
enjoycrack12-Apr-07 2:27 
Questionhow to play audio in 2003 Pin
Kirtibangalore12-Apr-07 0:53
Kirtibangalore12-Apr-07 0:53 
AnswerRe: how to play audio in 2003 Pin
Goalie3512-Apr-07 4:27
Goalie3512-Apr-07 4:27 
AnswerRe: how to play audio in 2003 Pin
e2canoe12-Apr-07 4:57
e2canoe12-Apr-07 4:57 
Questionhow to properly hide elements Pin
markymark8212-Apr-07 0:36
markymark8212-Apr-07 0:36 
AnswerRe: how to properly hide elements Pin
gauthee12-Apr-07 0:39
gauthee12-Apr-07 0:39 
GeneralRe: how to properly hide elements Pin
markymark8212-Apr-07 0:52
markymark8212-Apr-07 0:52 
GeneralRe: how to properly hide elements Pin
gauthee12-Apr-07 1:10
gauthee12-Apr-07 1:10 
AnswerRe: how to properly hide elements Pin
kubben12-Apr-07 5:43
kubben12-Apr-07 5:43 
GeneralRe: how to properly hide elements Pin
Not Active12-Apr-07 7:48
mentorNot Active12-Apr-07 7:48 
GeneralRe: how to properly hide elements Pin
kubben12-Apr-07 13:55
kubben12-Apr-07 13:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.