|
Every thing seems ok. May be the PostBackUrl property makes the problem. Try an 'a' tag instead of LinkButton.
Thomas
|
|
|
|
|
What does the generated code look like?
Why do you concat the url using server code, when you can just as well put it in the markup code:
PostBackUrl="javascript:openWindow('UserDetails.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>');"
---
single minded; short sighted; long gone;
|
|
|
|
|
How to maintain Scroll Position when press the Back button?
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
Check this one
this.Page.MaintainScrollPositionOnPostBack = true;
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi friend's
i want to load a page in a window that opened by javascript
but my problem is that in the requested page i write code to determine the url of the requester page,but when i open a window by javascript i can't determine the url of the requester page,in the other word:the value of "Request.UrlReferrer.AbsoluteUri" is null.
what can i do ???
my really question is:
how can i load a page in a window that has not scrollbar or menubar and the width and heigth value is constant,and in addition i can determine the requester page on the requested page?
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
When you use the window.open method, the requested page has no requester. If you would use a link with target="_blank", the requested page would have a requester, but then you can't control the appearence of the window.
In Javascript you can reach the parent window using window.opener , but you can't reach it directly from the server code.
Why do you need the url anyway? What are you going to use it for?
---
single minded; short sighted; long gone;
|
|
|
|
|
I have built ASP.NET 2.0 application using Visual studio 2005.
I created it as a website with Http type on IIS(Localhost)(not File system which VS 2005 defaultly creates website).
Say my application name is Website1:
Root is : http://localhost/Website1
I am using Frontpage to move my website from local to weserver.
Issue: Tried opening my local website1 by using root http://localhost/Website1.
It defaultly opens LocalHost as website and Never allowed me to open website1 folder as website.
But it gets moved as folder 'website1' from localhost to webserver.that doesnt work.
I also saw on my IIS Website1 is a website(not just a folder).
I cannot understand, whats going on.Is there some things to configure...
Any kind of help would be appreciated.
Thanks in advance
Mohamed
|
|
|
|
|
u can easily deploy web sites by creating a website in web server and just copying files from local site to server using FTP.
or u can use Copy website option in Visual studio.
regarding ur prob,
when u work on local site, u will be creating virtual directory in IIS..
in server u will be actually creating website.. and u have to configure the website properties in IIS in the server
i think this will be helpful
http://support.microsoft.com/kb/323972
try.. bye..
CST
|
|
|
|
|
I am working with WYSIWYG Editor,How to do this in Asp.Net 2.0?
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
|
I have created a report but I want to format it and put in headers and a bit of colour to it.
Does anyone know how I can do this.
Thanks,
macca
|
|
|
|
|
if u are using report wizard, then u have option to get formatted colored reports in style tab of report wizard.
or u can manually do that by changing properties of report fields.
CST
|
|
|
|
|
Hi All
i have a repeater control in that i have to coulmns i need to sorts those columns i am able to sort but according to sorting asscending or descending
i need to change the image in the header How to go for it ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
When you sort, change the html you generate to show the right image.
Christian Graus - Microsoft MVP - C++
"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 Chris,
Thanks for showing some direction but i don't know how to get access to the header part of repeater. below is the my repeater
<br />
<asp:Repeater ID="Repeater1" runat="server" ><br />
<HeaderTemplate ><br />
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%; border-collapse: collapse;"><br />
<tr><br />
<td class="tanrow" align="Left"><br />
<asp:LinkButton id="lnkPartID" OnClick="SortCommand" OnClientClick="hideId();" runat="server" CommandArgument="ID">ID</asp:LinkButton><br />
<asp:Image ID="ImageID" runat="server" ImageUrl="~/Images/IconArrowDown.gif" /><br />
</td><br />
<td align="Left"><br />
<asp:LinkButton id="lnkPartName" runat="server" OnClick="SortCommand" CommandArgument="Name">Name</asp:LinkButton><br />
<br />
<asp:Image ID="ImageName" runat="server" ImageUrl="~/Images/IconArrowUp.gif"/><br />
</tr><br />
</HeaderTemplate><br />
<ItemTemplate><br />
<tr id="DataRow" runat="server"><br />
<td align="Left" ><br />
<%# (DataBinder.Eval(Container.DataItem, "ID"))%><br />
</td><br />
<td align="Left" ><br />
<%# (DataBinder.Eval(Container.DataItem, "Name"))%><br />
</td><br />
</tr><br />
</ItemTemplate><br />
<br />
<FooterTemplate><br />
</table><br />
</FooterTemplate><br />
</asp:Repeater><br />
Now i want to change the image of the header after sorting
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi Everyone
I'm using ASP.NET 1.1, MS SQL Server2000 and C#. There is a datagrid in one of the pages. It contains some rows, in this data, now I have only Yes or No for a particular column. But I need to display one image when the value is 'Yes' and another image for 'No'. Is this is possible? Please help me to do it. The detail code is giving below..
I put in the inline as
<asp:templatecolumn headertext="Diff">
<headerstyle horizontalalign="Center" width="5%" cssclass="TabCellHeader">
<itemstyle horizontalalign="Center">
<edititemtemplate>
<asp:image id="imgYesNo" runat="server" imageurl="<%# AddYesNoImage(DataBinder.Eval(Container.DataItem, "MyYesNoColumn").ToString()) %>">
and in the code behind,Item Data bound event of the grid
if (dTotal != dSum) e.Item.Cells[12].Text = "No";
else e.Item.Cells[12].Text = "Yes";
and
public string AddYesNoImage(string yesNo)
{
if (yesNo == "Yes") return "";
else return "";
}
I put the pictures in the images folder.
is this right?.. still I'm getting 'Yes' or 'No' instead of pictures.. Please help me
Thanks in advance
Fraijo
fraijo
|
|
|
|
|
In your datagrid you will need an itemtemplate. This will allow you to write some binding code that will properly display the correct image.
<ItemTemplate>
<asp:Image ID="imgYes" runat="server" ToolTip="Yes" AlternateText="Yes" ImageUrl="~/images/Yes.gif" Visible='<%# (int)DataBinder.Eval(Container.DataItem,"Total") == (int)DataBinder.Eval(Container.DataItem,"Sum") %>' />
<asp:Image ID="imgNo" runat="server" ToolTip="No" AlternateText="No" ImageUrl="~/images/No.gif" Visible='<%# (int)DataBinder.Eval(Container.DataItem,"Total") != (int)DataBinder.Eval(Container.DataItem,"Sum") %>' />
</ItemTemplate>
Hope that helps.
Ben
|
|
|
|
|
Hi,
I have a web page where clicking on a button I am opening another web form using window.open function. Now I want to know how to capture the date selected by the user and put it in the parent web form.
Regards,
Rocky
Rakesh
|
|
|
|
|
hi....
You can do that using window.opener in javascript
Example....
1.html
<html><br />
<body><br />
<script type="text/javascript"><br />
var anotherwindow=window.open("2.html")<br />
anotherwindow.bgColor="black"<br />
</script><br />
</body><br />
</html>
2.html
<html><br />
<head><br />
<title>Secondary window</title><br />
</head><br />
<body bgcolor="#FFFFFF"><br />
<center><br />
<form><br />
<input type="button" onClick="window.opener.document.bgColor='yellow'" value="yellow"><br />
<input type="button" onClick="window.opener.document.bgColor='lightgreen'" value="lightgreen"><br />
<input type="button" onClick="window.opener.document.bgColor='white'" value="white"><br />
</form><br />
</center><br />
</body><br />
</html>
Regards,
Sandeep Kumar.V
|
|
|
|
|
The child form has a concept of the parent. You can access controls on the parent form via javascript. In javascript you would do something like this:
self.opener.document.forms[0].parentControl.Value = childControl.value;
Hope that helps.
Ben
|
|
|
|
|
Thanks for the response.
Where you want me to put this code in the child page. I mean in which event?
Rakesh
|
|
|
|
|
Here is some vb.net code I wrote a while back. I had the user press a save button that did a post back and then called this method:
Private Sub closewindow(ByVal indate As Date)
Dim myScript As New StringBuilder
With myScript
.Append("<script>")
.Append(Environment.NewLine)
'This code sets the correct field on the opener form
Dim tmpstr As String = "self.opener.document.forms[0]." + CStr(Session("DatelookupField"))
.Append(tmpstr)
.Append(".value = """)
.Append(indate.ToShortDateString)
.Append("""")
.Append(Environment.NewLine)
'focus the opener form
.Append("self.opener.focus()")
.Append(Environment.NewLine)
'Close the calendar window
.Append("self.close()")
.Append(Environment.NewLine)
.Append("</script>")
Page.RegisterStartupScript("close window", .ToString())
End With
End Sub
All this code is .net 1.1 I set a session variable in the parent form so I knew what the control name was to pass the date back to the parent form.
Hope that helps.
Ben
|
|
|
|
|
want to create a report just like report builder as provided by .net framework in word .User can drag and drop the fields in Ms word file .I started approaching to VSTO 2005.
I want to create Office projects using VSTO under visual studio 2005.
Is VSTO Free? I assumed that it is and i've followed the instructions from MSDN.
I've:
- installed office 2003 with its sp1,
- installed office interop assemblies: O2003PIA package - 5MB which came out from oxppia - self extractor 1,69MB
- used vstor.exe - 1,27MB
- used OfficeVSTOWindowsInstaller 187KB
I still don't see in my project types Office projects under New->Project and I can't open any samples as it shouts that this type is not supported...
kindly help me how should I approach ....
PKSAHOO
|
|
|
|
|
Hello,
I want to send log-data to a client over TCP/IP and UDP. As data format I think the best way is to use XML. Now I search a possibilty to make a well formed Xml file from the data. I have found some solutions with External entities. But here I have the problem that I have an live stream and I don't want to make allways a new file of the stream.
What is the best solution to do this?
It would be great If in the future I have the possibilty to open the log-server also with an internet explorer...may be someone can give me some hints...
Best regards
Hansjörg
|
|
|
|
|
This will work. Put it as the only code in a page behind file.
protected void Page_Load(object sender, EventArgs e) {
Response.Clear();
Response.ContentType = "text/xml";
XmlSerializer xml = new XmlSerializer(typeof(SomeObject));
xml.Serialize(Response.Output, someObject));
Response.Flush();
Response.Close();
}
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|