|
what u have to do is when u r redirecting from one page to another use Server.Transfer instead of Response.Redirect.
save the id to a session variable and then give Server.Transfer(url);
and from the destination page u can give
Label1.Text=Session["name"].ToString();
so u can use the id from the lable and ur url will be clean.
Vipin
|
|
|
|
|
I beleive, if I Call Server.Transer("Page2.Aspx") from Page1.aspx The Url in adddress bar remains same as Page1.aspx.
But What I need is that when I am in Page2.aspx, I want the Url in address bar to be say "FriendlyUrl.aspx" and So on , but I do not have to create any web pages for FriendlyUrl.aspx , just rewrite the Url in address bar to a any friendly one.
I have experimented the following code:
Inside the projects Global.asax.cs, add the subroutine
Application_BeginRequest()
{
HttpContext hc = HttpContext.Current;
string strOldUrl = hc.Request.Path ;
string strNewUrl = "http://FriendlyURL";
if strOldUrl.equals(http://UglyURL) then hc.RewritePath(strNewURL)
}
But I getting the error Friendly Url does not exist.
Pl help. Thanks in advance
Pls help. Thanks in advance
-- modified at 0:20 Friday 7th July, 2006
|
|
|
|
|
This code will help you
Write this code in web.config
<configuration>
<system.web>
<urlrewrites>
<rule>
<url>/urlrewriter/show\.asp
<rewrite>show.aspx
<rule>
<url>/urlrewriter/wohs\.asp
<rewrite>show.aspx
<rule>
<url>/urlrewriter/show(.*)\.asp
<rewrite>show.aspx?$1
<rule>
<url>/urlrewriter/(.*)show\.html
<rewrite>show.aspx?id=$1&cat=2
<rule>
<url>/urlrewriter/s/h/o/w/(.*)\.html
<rewrite>/urlrewriter/show.aspx?id=$1
Vipin
|
|
|
|
|
hi everyone,
Iam a biginner,i want to know about creation of user control application to develope my webforms easily...............
plz help me.........
( (
suresh babu.k
-- modified at 10:14 Thursday 6th July, 2006
|
|
|
|
|
This article will help you in that.
http://www.15seconds.com/issue/020319.htm
Best Regards,
Apurva Kaushal
|
|
|
|
|
I m generating htmltable on serveside and then placing it on webform with placeholder.Now i can show all htmltable on webform and user can see results coming from database.But now i want user to edit that information he wants so how can i do this?
Plz help
|
|
|
|
|
can u plz make it more clearer. Probably i can help u.
Vipin
|
|
|
|
|
I m making rumtime table
for e.g
Dim table As New HtmlTable
Dim row As New HtmlTableRow
Dim cell As New HtmlTableCell
row = New HtmlTableRow
cell = New HtmlTableCell
cell.InnerText = "Observation"
cell.Align = "left" : cell.VAlign = "top"
cell.Width = "31%"
cell.Style.Add("font-weight", "bold")
row.Controls.Add(cell)
cell = New HtmlTableCell
cell.InnerText = "Amount"
cell.Align = "left" : cell.VAlign = "top"
cell.ColSpan = 2
cell.Width = "20%"
cell.Style.Add("font-weight", "bold")
row.Controls.Add(cell)
cell = New HtmlTableCell
cell.InnerText = "Cases"
cell.Align = "left" : cell.VAlign = "top"
cell.Width = "10%"
cell.Style.Add("font-weight", "bold")
row.Controls.Add(cell)
And put the values in cell from database.
Now table is shown in PlaceHolder.
Now user can view Different rows for that.
Now Question is that if user want to Edit Particular row ...How can he?Bcoz how will catch click event .....as in datagrid we can catch CLick event but i dont know how can we catch in PlaceHolder
Plz Help
|
|
|
|
|
Can anyone please tell me how to give serial numbers to a datagrid. dont misunderstand as paging in datagrid. I should have an extra field in the front showing the serial numbers based on the number of fields in the datagrid.
Thank you,
Vipin
Vipin
|
|
|
|
|
build serial no column from your sql query and display the numbering field as your first column
|
|
|
|
|
you need to create an extra TemplateColumn in DataGrid and bind it to ItemIndex and you will have a counter in DataGrid.
<asp:templatecolumn headertext="Serial Number">
<itemtemplate>
<span><%# Container.ItemIndex %></span>
</itemtemplate>
</asp:templatecolumn>
hope this help
Nav.
|
|
|
|
|
Thank u both of u for ur suggestions.
Vipin
|
|
|
|
|
I have an asp.net web app that uses a web service's method to update an XML file in the webservices directory.
Except im getting an error that it does not have the correct permissions when i try to call the method that writes to the file.
I believe i need to change some security settings in IIS to rectify this but I'm not sure what.
Can anyone help ?
Thanks.
|
|
|
|
|
The worker process will not have UCL write permissions on the file directory - you need to set these. Right click on the directory and go to security.
|
|
|
|
|
Thianks, this was the first thing that i tried but it has not worked
|
|
|
|
|
Who are you giving WRITE permission to? Try giving permission to the NETWORK SERVICE user.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hi,
I am working on an application which makes use of a third party API to send SMSes to specific users. According to the company providing the service, commands to their server are sent as XML documents via HTTP POST. I have looked around the codeproject site and I have found that there is a class called WebClient that appears to do this.
Am I on the right track? or is there another way of doing it? As far as I have understood, I should be using the Upload method of the WebClient class to send the XML document to a specified URL.
Any ideas, hints or suggestions would be much appreciated
Thanks,
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
I am trying to implement Search Engine in ASP for my site, will you send code for this ?
Prashant
|
|
|
|
|
no problem - just add the following:
<a href="www.google.com">Bloody Muppet</a>
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
HI friends,
Kindly help me to lock the View Source tab from the Web page. That is when we right click the web page and select View Source or when we select the view tab from the tool bar and the select Source it should say Sorry You Cannot View The Source.Hope u people got my query. If any one knows the code for it do send it.
Thank you,
Vipin
|
|
|
|
|
|
i agree with u. but only who have a very good knowledge in computer will know to disable the script. rest of who just go through do know how to disable it. so it would be of great help if u tell me how to do it.
I am sure it can be done because i have see it some sites. but i dont know how to do it
thank u for ur response.
Vipin
|
|
|
|
|
I would venture a guess that anyone who cares to look at your source and can understand it, would know to disable javascript.
|
|
|
|
|
Why would you even need to do this? You are providing something into the public domain (the internet) - anyone who really wants to see the source of the page will be able to, and anyone not savvy enough will not even bother wanting to!
Either way you cant stop people viewing the html source of any page you put online. As was stated in the linked post above, anything you dont want the public to see you shouldnt put online. That is the only guaranteed way of stopping people viewing the source!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
i create a report in crystal report and i want set the color of row gran but not all of the row
i want one row be withe and one row be gran
can i do this work?
plz help me...
|
|
|
|