|
Use the <center> tag around all the content in the iframe page. (better yet use CSS but its a little bit more complicated to get it to work in every browser)
|
|
|
|
|
Hi,
I am using the below code in my page, to call the Javascript function to open a popup calendar and the Selected Date will be assigned to the TextBox1. It works fine in my page.
<a id="idViewCalendar" href="JavaScript:GetDate('<%= TextBox1.ClientID%>')"><img id="idimg" src="../Images/DateImage.gif" alt="Popup Calendar" border="0" /></a>
But Now, I wish to use this Anchor tag within the EditItemTemplate of the GridView. In that Template, I am having a TextBox and this Anchor Tag.
How can I pass the Client ID of the TextBox to the Popup Calendar Page? If this way is wrong, how can I proceed further? Pls guide me.
Note: If I am using the same code in my GridView, it gives the error like, TextBox1 is not Declared.
function GetDate(txtDateID)
{
window.open("../MyCalendar.aspx?ID="+txtDateID,"popup","location=1,status=1,scrollbars=0,width=260,height=260");
}
(It is a repost. B'cos,I didnt get the solution yet)
Regards,
Jay
|
|
|
|
|
Paste your HTML page and code snippet..I have a solution for this
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
<asp:TemplateField HeaderText="Review Date" SortExpression=""review_date","{0:d}""><br />
<EditItemTemplate><br />
<asp:TextBox ID="review_date" runat="server" Text='<%# Bind("review_date","{0:d}") %> '></asp:TextBox> <br />
<br><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:TextBox ID="review_date" runat="server" Text='<%# Bind("review_date","{0:d}")%>'></asp:TextBox><br />
<a id="idViewCalendar" href="JavaScript:GetDate('review_date')">Regards,<br />
<br />
Jay :)
|
|
|
|
|
change the anchor tag as runat=server
======================================
<asp:TemplateColumn>
<ItemTemplate>
<asp:TextBox ID="review_date" runat="server"></asp:TextBox>
<a id="idViewCalendar" runat="server"><img id="idimg" src="../Images/DateImage.gif" alt="Popup Calendar" border="0"></a>
</ItemTemplate>
</asp:TemplateColumn>
add thsi in ItemDataBound
========================
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HtmlAnchor anc = (HtmlAnchor)e.Item.FindControl("idViewCalendar");
TextBox txt = (TextBox)e.Item.FindControl("review_date");
anc.HRef = "JavaScript:GetDate('" + txt.ClientID + "')";
}
}
Hope this will solve your problem
Revert back
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi,
Great Mr.Sylvester. It works fine. Eventhough I know the Event RowDataBound in GridView control, due to lack of experience, I felt some problem implementing this.
Great. Thanks.
Regards,
Jay
|
|
|
|
|
Hi there,
I'm relatively inexperienced with ASP.NET, but have been using C# for a number of years now, so have a good grasp on the .NET framework
However, working for a small software developer means that we don't always have the time to dedicate the creation of complex web apps from scratch. So I did a bit of research and found Iron Speed Designer.
It seems to good to be true, automatically generating all that code for you! So I'm after comments from people who have used it - is it really all that it's cracked up to be?
Also, if anyone has experience of other code generators, I'd be interested in hearing from you too
Many thanks in advance
Baz
|
|
|
|
|
|
how to get RSS data from a feeder and consume it in my website. Acess the content from feeder site in RSS format and without navigating to feeders web page while clicking the link.
|
|
|
|
|
|
can i get the coding in asp 1.1
thks
|
|
|
|
|
|
|
Describe further please you would
|
|
|
|
|
Thanks for your reply...
I have TreeView which I fill from DB and this TreeView is in MasterPage, one my aspx page have MasterPage (this MasterPage contain TreeView) when i change data for TreeView in aspx page and I press button 'Save Changes', changes which I have done should me seems in TreeView.
Example:
If I delete data for one Node this change should seems in TreeView
Hope I was clear
|
|
|
|
|
Master pages is only a tool to separate different part of the page when you are constructing the page on the server. When the page is sent to the browser, it's a complete page, so you can't update only the master page or only the content, as that separation doesn't exist in the final page.
If the data in the master page is not updated when you reload the page, then you are getting the data for the master page before the content page does the update.
If you get the data in Page_Load and do the update in a button event, you will be loading the old data, then update the data, as the control events occur after Page_Load. You can use the Page_PreRender event for anything that you want to do after the control events.
---
single minded; short sighted; long gone;
|
|
|
|
|
thanks Guffa for your reply
I found the way how to do that, here is my code
Master.Page.Header.Title = "MasterPage </title>" +<br />
"<meta http-equiv='refresh' content='1;url=ChildPage.aspx'>";<br />
Response.Redirect("ChildPage.aspx");
Now i am able to see changes on TreeView1
If you have any better solution plz tell me.
|
|
|
|
|
Blue_Boy wrote: I found the way how to do that, here is my code
Master.Page.Header.Title = "MasterPage " +
"";
Response.Redirect("ChildPage.aspx");
Most of that code is wrong, and you are only saved by the fact that the part that is wrong is not used at all. You can shorten the code to:
Response.Redirect("ChildPage.aspx");
Changing the title has no effect, for two reasons:
:: The current page will be discarded and a redirect page will be sent to the browser instead.
:: The text will be html encoded, so the meta tag that you try to add to the header (in the wrong place) would not be a tag at all, just some text displayed in the title.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks for your warnings, I will try to find correct solution.
|
|
|
|
|
Hi I have developed an ASP.NET Web application say in MachineA. I want to copy directories to say MachineB by accessing the application in MachineA from MachineC. I am using DirectoryInfo and CreateSubdirectory methods, but its throwing Access Denied error,CreateSubdirectory does not support UNC. I mapped the network path and tried, but still its not working. Is there any other way to copy files across machines. Please guide me in this regard. Thanks in advance.
Email:shammr.ace@gmail.com
Warm regards,
Sham M R
|
|
|
|
|
HI Sham Seems intresting
i have done uploading a file from client to server using javascript
but haven't tried this one .... Might be you will have to give security access as full control to others
<l>Thanks and Regards
Sandeep
|
|
|
|
|
hi..
can we execute stored procedure without receiving all the output parametes in asp.net.
thanks in advance for the hel
enjoy..
|
|
|
|
|
rama charan wrote: without receiving all the output parametes
What do you mean by this ?
The parameters will always be returned, only the difference may be under some circumstances some output parameters may be null.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
thanks for reply
i mean that can the stored procedure be returning more output parametes than i capture at the appln asp.net code?
is there way tht i can just neglect the other output parameters sent to me without just receiving them ?
hope i am clear now
enjoy..
|
|
|
|
|
I think you need to declare all parameters, but you can always neglect the unused ones after you get the values from db ?
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|