|
It will work Boss.
Make sure your aspx page is in the format
<Columns>
<asp:TemplateColumn HeaderText="Edit">
<ItemTemplate>
<table runat="server" id="tbl">
<tr>
<td>ok</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
---------------------------------------
and you have properly binding data to Datagrid
DataTable dt=new DataTable();
dt.Columns.Add(new DataColumn("One"));
DataRow drow=dt.NewRow();
drow[0]="okman";
dt.Rows.Add(drow);
DataGrid1.DataSource =dt;
DataGrid1.DataBind();
-------------In item databound event write below
if(e.Item.FindControl("tbl")!=null)
{
Response.Write("Found");
}
It will write "Found"
|
|
|
|
|
I believe that you'll need to add the attribute runat = "server" to your table:
...<br />
<br />
<edititemtemplate><br />
<table id = "dynamic" runat = "server"><br />
<br />
...
That should allow you to use FindControl to retrieve it. Hope that helps.
--Jesse
|
|
|
|
|
It is still not working Thanks
|
|
|
|
|
Man try this thing
dim c as control=e.item(index).findcontrol("dynamic")
You should mention the index of the datagrid row.
Do good and have good.
|
|
|
|
|
it is producing error sorry
|
|
|
|
|
What is the maximum duration of Cookie
thanx in advance
|
|
|
|
|
What's the max amount of time in seconds/minutes/hours you can have? Xactly, infinite. Technically, the client would eventually do a system shutdown or reboot, so you can even set the cookie to last for 10hrs -> nidheeCookie.Expires.Add.Minutes(600);
Figure it out buddy!
Live in fragments no longer. Only connect.
|
|
|
|
|
Yep, infinite:
here is one year:
Dim aCookie As New HttpCookie("myCookie")
aCookie.Expires = DateTime.Now.AddDays(365)
You can always keep extending the time by setting the cookie again each time they hit your site.
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
Hi,
Can anybody help me in suggesting, how can i play only a part of the song using a Window Media Player object on the web page(say from start of the song to 20 seconds of the song).
Thanks,
Sai.
|
|
|
|
|
Record 20 Seconds +- of the song using JetAudio.
Live in fragments no longer. Only connect.
|
|
|
|
|
|
Hey i have got an asp file with following code:
<%@LANGUAGE="JavaScript"%>
<%
var roomID = Request("RoomID");
%>
<title>Messages place
<%=formatAll(roomID)%>
Can someone please try to change this page code into asp.net
|
|
|
|
|
Change the file extenstion from asp to aspx
lehya wrote: Can someone please try to change this page code into asp.net
How about you volunteer to do this?
|
|
|
|
|
We'd be happy to help you through the transition from ASP to ASP.NET. If you have specific questions surrounding ASP.NET or a specific project, please post them. That being said, I don't believe you'll find much support with a post like this. It is considered very bad form to ask someone else to do your work for you without showing that you're making an effort to learn. Given the sheer volume of resources for a beginner trying to learn ASP.NET, there really is no excuse for not giving it a try. After all, none of us will be around to maintain the code for you after the translation is done.
To help get you started, here[^] is a Google search on learning ASP.NET, with plenty of hits to look through.
Besides all of that, due to the missing functions (formatAll, getMessageRefreshTime) and the missing include file (chatprocessing.asp), even if someone did translate this page for you, the benefit would be sketchy at best. There is no real functionality in the code sample that you posted. The missing parts do all of the work.
--Jesse
|
|
|
|
|
Hey Jesse...
Thanks for whatever u told me...I have been trying to learn the differences between ASP and ASP.NET , but your google search didnt really was of use to me..Theoretically it continued well for session state differences etc..but not into the depth of the code...
Anyways, chatprocessing.aspx and the rest was all fine Jesse and the rest i have done is going on well with other pages..But i had a small doubt which would make everyone get into chaos..So i just posted the coding and asked to change it into .aspx file...
The thing is when we are changing this type of file we are just changing a few tags only..but the statements like.... <%=formatAll(roomID)%>.....i had a doubt with them and so i asked the help...anyway thanks buddy..I found this site to be useful and so i just made it out a point to know it from a few professionals too about how can we do it...I hope u can solve some of our beginner level problems too...
|
|
|
|
|
I wouldn't bother trying to "learn the differences between ASP and ASP.NET". Instead, just learn .NET. Forget everything you know in asp and learn asp.net from the begining. Learning the differences won't help a bit, IMO. I think the biggest challenge in making the switch from asp to asp.net is that you have to get away from thinking about the page running from the top to the bottom. You have to think of .NET as event driven. When you click a button that is an event. So in your code behind, you have insert the code you want to happen when the button click event occurs. Most of your code will sit in the code behind, allowing separation between your HTML and your code. Have you ever written a VB windows application? (VB6, VBA, or .NET) Web development is similar to this, only you have some more concerns like the viewstate, session, and security.
Hope that helps a little bit!
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
Well this is the problem the validators work fine but i wanto change the label color when field that i want to validate is invalid. The problem is tha i donot want to do this in the server side but in the clientside.
Can anyone help me.
Thanks in advance
|
|
|
|
|
Maybe this is what you're looking for?
http://www.codeproject.com/aspnet/EnhanceASPNETDisplay.asp[^]
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
well i missed to say that i am using asp.net 2.0 well i puted the code in a small example page width that code but the problem is that i gives me a javascript error an o quote "'ValidatorUpdateDisplay' in undefined".
Thanks for the help
|
|
|
|
|
I need to execute FTP over SSL. I am using VB.Net 1.1 Technology. can any1 please suggest which class or namespace should i refer for it.
Thanks & Regards
Manish
|
|
|
|
|
Hello
I'm Using Siberx Pdf Library for pdf document.
i'm using following code for it but it is not displaying anything
plz tell me where i'm doing anything wrong.
Dim pdfDocument As Siberix.PDF.Document = New Siberix.PDF.Document
Dim pdfPage As Siberix.PDF.Page = pdfDocument.Pages.AddPage(612, 792)
pdfDocument.Info.Title = "Info section"
pdfDocument.Info.Subject = "Info section example"
pdfDocument.Info.Author = "Siberix Technologies, Canada"
pdfDocument.Info.Creator = "Siberix PDF Library"
pdfDocument.Info.Keywords = "Siberix, PDF"
pdfDocument.Info.AddProperty("Name", "Alex")
pdfDocument.Info.AddProperty("Birthday", "01/27/1975")
pdfDocument.Info.AddProperty("SIN", "123 456 789")
pdfPage.Graphics.Font = New Font("Impact", 20)
pdfPage.Graphics.Brush = New SolidBrush(Color.Green)
pdfPage.Graphics.DrawString(10, 10, "Text")
pdfPage.Graphics.Font = New Font("Impact", 35)
pdfPage.Graphics.Brush = New SolidBrush(Color.FromArgb(134, 155, 217))
pdfPage.Graphics.DrawString(10, 10, "Hello ")
pdfPage.Graphics.Flush()
thanx
|
|
|
|
|
Scenario:
- I have session state variables being saved and loaded from an ASP.NET page.
- I have session state variables being set from within a UserControl that exists on that same page.
Problem:
- When I set a session state variable within the codebehind page of the UserControl and the page performs a postback I am unable to access the session state variable that was set within the UserControl during the OnInit method of the ASP.NET page that the control is on?
- I am checking this by enumerating the session state variable collection for the page at both the OnInit and OnLoad methods of the page and the controls session state variables are not available at either. However, after the page has loaded I look at the trace information and see that the user controls session state variables are there (but not in the collection during the pages OnLoad event....)
Question:
- In regards to the accessability of the UserControls session state variables on the page: Are the session state variables loaded into the pages session state collection during the loading of the control itself (which is why I cant access them during the OnInit phase of the Page itself?)
- Shouldn't Session state variables be accessable to the page and all children controls of that page for that user?
I'm going to try to move some of the code that uses the session variable to a later rendering phase of which it's accessable however there is some things I'm doing that have to be done in the OnInit, OnPreRender, etc. page load phases...
Thanks for any insight you can provide =P
-- modified at 6:34 Friday 14th July, 2006
|
|
|
|
|
The user control doesn't have any separate session variables, there is only one Session object for the request.
If there is no session variable, it simply hasn't been created yet. You have to wait until the user control has been created.
---
b { font-weight: normal; }
|
|
|
|
|
You know what to do yet you chose to ask the question? Anyway, you'll never get lost doing that.
Just access the HttpCookie in the Pageload event. I suppose during init, variables havent been created yet.
Live in fragments no longer. Only connect.
|
|
|
|
|
Hi Friends.
I am putting datalist in the edititemtemplate of the datagrid.After then some part of the datalist code is not executing.I am placing the datalist code in it's itemtemplate.
I am using the following code.
<asp:DataGrid id="dg1" runat="server" Width="392px" Height="144px" AutoGenerateColumns="False"<br />
AllowPaging="True" PageSize="5"><br />
<Columns><br />
<asp:TemplateColumn><br />
<HeaderTemplate><br />
<TABLE width="100%"><br />
<TR><br />
<TD width="70%">Deposit Types<br />
</TD><br />
<TD align="center" width="15%">Edit<br />
<</TD><br />
<TD align="center" width="15%">Delete<br />
</TD><br />
</TR><br />
</TABLE><br />
</HeaderTemplate><br />
<ItemTemplate><br />
<TABLE width="100%"><br />
<TR><br />
<TD><%#Container.DataItem(1).ToString()%></TD><br />
<TD align="center" width="15%"><br />
<asp:ImageButton id="edit" ImageUrl="images/edititem.gif" CommandName="edit" Runat="server"></asp:ImageButton></TD><br />
<TD align="center" width="15%"><br />
<asp:ImageButton id="Imagebutton1" ImageUrl="images/cross.gif" CommandName="delete" Runat="server"></asp:ImageButton></TD><br />
</TR><br />
</TABLE><br />
</ItemTemplate><br />
<EditItemTemplate><br />
<TABLE id="edititem" width="100%"><br />
<TR><br />
<TD width="100%"><br />
<asp:DataList id="dl1" Runat="server"><br />
<ItemTemplate><br />
<table width="100%"><br />
<tr><br />
<td width="30%"><br />
<%#FindAttribute(Container.DataItem(0).ToString())%><br />
</td><br />
</tr><br />
</table><br />
</ItemTemplate><br />
</asp:DataList></TD><br />
</TR><br />
</TABLE><br />
</EditItemTemplate><br />
</asp:TemplateColumn><br />
</Columns><br />
<PagerStyle Mode="NumericPages"></PagerStyle><br />
</asp:DataGrid>
Please help.
-- modified at 6:09 Friday 14th July, 2006
|
|
|
|