|
You can write a javascript file(.js) and put it in the application folder and whereever(aspx pages) you want, you just need to include that file.
Best Regards,
Apurva Kaushal
|
|
|
|
|
what will be the value of src in ... tag?
|
|
|
|
|
you can use like this:
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi All,
I want to go back to my previous page so I code as
previouspage = Request.ServerVariables("HTTP_REFERER")
Response.Redirect(Request.QueryString("previouspage"))
but this will always returns Empty string.
Why this is so.
I hope somebody know about it.
Thanks,
Nagraj
|
|
|
|
|
Nagraj Naik wrote: Request.QueryString("previouspage")
Do you have something there in querystring?
Best Regards,
Apurva Kaushal
|
|
|
|
|
Yes,I am sending Id value in querystring
|
|
|
|
|
Request.ServerVariables("HTTP_REFERER") this will give you the complete URL of the previous page so you can use this directly with response.redirect.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Apurva,
I still have doubt.
As you suggest,I make some trace
I am navigate from Admin.aspx to password.aspx
In password.aspx page on button click I write code
Dim str As String = Request.ServerVariables("HTTP_REFERER")
Response.Redirect(Request.ServerVariables("HTTP_REFERER"))
str having value "password.aspx" while I am expecting it should be "Admin.aspx".
Why this is so?
|
|
|
|
|
but it is giving me the correct result:
what i have done is:
Response.Write(Request.ServerVariables["HTTP_REFERER"].ToString());
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I got solution.Due to page postback
Request.ServerVariables("HTTP_REFERER") get overwritten by current page.
Thanks apurva and gulf for all your efforts.
Let's meet soon.
Thanks again.
Best Regards,
Nagraj
|
|
|
|
|
always welcome...
Best Regards,
Apurva Kaushal
|
|
|
|
|
Let's see...
You get the referrer URL into a variable. So far so good.
Then you ignore that URL and instead try to go to an URL that you get from the query string.
I wonder why that doesn't return to the previous page...
---
b { font-weight: normal; }
|
|
|
|
|
Or you can try
Page.Request.UrlReferrer.AbsolutePath
Pilo
|
|
|
|
|
Hi i am very much new to .net.. can any one suggest me the books and other stufs where do i get from
Advance thanks.
Thelip
Hai this is fresh programer
|
|
|
|
|
Hi Thelip,
Please Get the Book of Wrox publication Asp.net 2.0. For beginners it will be very mch useful.
With Regards,
with regards
Satips
|
|
|
|
|
Hi,
I am having an application with one html page and it contains some text in that page. Suppose if I select some text it should be change it’s color using JavaScript.
kamalnath
|
|
|
|
|
Hi all,
I am using template column to add checkbox in my grid.But when I check status of checkbox on button click it always returns status=FALSE
why this is so? Here is my code
protected void Page_Load(object sender, EventArgs e)
{
int [] arr;
arr = new int[4] {1,2,3,5};
GridView1.DataSource=arr;
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
int i;
for (i = 0; i < GridView1.Rows.Count; i++)
{
bool chk = ((CheckBox)GridView1.Rows[i].FindControl("Admin")).Checked;
if (chk)
{
//some code
}
}
}
<asp:gridview id="GridView1" runat="server">
<columns>
<asp:templatefield>
<itemtemplate>
<asp:checkbox id="Admin" runat="server">
<asp:button id="Button1" runat="server" onclick="Button1_Click" text="Button">
I hope u know it.
Thanks,
Nagraj
-- modified at 3:41 Friday 18th August, 2006
|
|
|
|
|
|
Hi,
I got solution Thanks for your help.
regards,
NAgraj
|
|
|
|
|
I try to reorder column of a gridview by overriding CreateColumns. The problem is after i reorder the column, the result table is not correct. The data that is bound into the result table doesn't arrange as i aspect, only the header is. Here is the example .-
no reorder
H1 H2 H3
D11 D12 D13
D12 D 22 D23
reorder column
H2 H3 H1
D11 D12 D13
D12 D 22 D23
why is it ?
|
|
|
|
|
Assuming the GridView control have more than 2 fields, the sample code below changes the order of the first two colomns:
protected override ICollection CreateColumns(PagedDataSource dataSource, bool useDataSource)
{
ICollection collection = base.CreateColumns(dataSource, useDataSource);
DataControlField[] array = new DataControlField[collection.Count];
collection.CopyTo(array, 0);
DataControlField tempField = array[0];
array[0] = array[1];
array[1] = tempField;
return array;
}
|
|
|
|
|
Nope, this would not work at all; at least for my code. As I said on my question, i can reorder all the columns as expect, and i check that the ICollection that return from the CreateColumns is correct. But however, the data that is bound to the table is not correct.
Actually, i already have the solution. I would post here if someone interest.
|
|
|
|
|
Tee+ wrote: Nope, this would not work at all; at least for my code
Not sure what you do with your custom control, but it does work in my case when I simply declare 3 fields in the exGridView control and use a sqldatasource to feed data. Anyway, glad you solved your problem.
|
|
|
|