|
ASP.NET 1.1
a) How Visual Studio compiles the whole ".cs" files and put them as a single assembly, <project_name>.dll, into the bin folder.
b) How can we do this compilation manually?
c) Why the ".aspx" pages are not included into it?
d) How the runtime will link the "aspx" files with this output DLL in the BIN folder?
e) Whether at runtime any classes are getting generated which pertain to each ".aspx" files? If, whats is the need for compiling only the ".aspx.cs" files?
ASP.NET 2.0
a) aspnet_compiler will compile the whole project and produce the output into a single DLL. How to do this manually?
b) Where the App_Code files got compiled?
c) Even though I put both my ".aspx" files and ".aspx.cs" files in a virtual directory instead of compiling, how things are getting worked at runtime?
Please request you to provide a clean picture on these.
Arun
|
|
|
|
|
Is this your homework or pre-interview questions?
|
|
|
|
|
Both. I have asked a lot of people whom I know to make things clear, but all gone in vague. I know the general views which were mentioned in MSDN, but I need something in "CORE".
If you can help me, thanks a lot.
Arun
|
|
|
|
|
There's a practice of not doing people's homework here.
Sorry.
|
|
|
|
|
I need to make a server control for controlling layout on my page. For various reasons, I don't want to use a master template, and the easiest approach is to make a server control which exposes two child controls. The content on my webpage will be added to these two exposed child controls, which in turn will be rendered surrounding by the layout HTML I need. Everything works fine, except I have no design-time support for it. In other words, I can compile the code, but I have no intellisense on in, which is a major inconvience. I've tried adding the standard attributes to the exposed properties, but I keep getting the "Content is not allowed between the opening and closing tags..." error. Can anyone tell me which attributes I need to add to my control class or its properties in order to get Visual Studio 2005 intellisense to work with the TopContent and BottomContent properties? Thanks!
// ######################################
// what the useage should look like :
// ######################################
<cc:LayoutTemplate runat="server">
<TopContent>
</TopContent>
<BottomContent>
</BottomContent>
</cc:LayoutTemplate>
// ######################################
// control definition :
// ######################################
public class LayoutTemplate : System.Web.UI.WebControls.WebControl, INamingContainer, IPostBackDataHandler, IPostBackEventHandler
{
#region FIELDS
private Control _topContent;
private Control _bottomContent;
#endregion
#region PROPERTIES
[PersistenceMode(PersistenceMode.InnerDefaultProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Control TopContent
{
get
{
return _topContent;
}
}
[PersistenceMode(PersistenceMode.InnerDefaultProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Control BottomContent;
{
get
{
return _bottomContent;
}
}
#endregion
#region CTORS
public LayoutTemplate(
)
: base(HtmlTextWriterTag.Div)
{
_toptContent = new Control();
_bottomContent = new Control();
this.Controls.Add(_topContent);
this.Controls.Add(_bottomContent);
}
#endregion
#region METHODS
protected override void RenderChildren(
HtmlTextWriter writer)
{
LiteralControl l = new LiteralControl(" ... top layout html here ... ");
l.RenderControl(writer);
this.TopContent.RenderControl(writer);
l = new LiteralControl(" ... middle layout html here ... ");
l.RenderControl(writer);
this.BottomContent.RenderControl(writer);
l = new LiteralControl(" ... bottom layout html here ... ");
l.RenderControl(writer);
// suppress child rendering
//base.RenderChildren(writer);
}
public void RaisePostDataChangedEvent(
)
{
}
void IPostBackEventHandler.RaisePostBackEvent(
string arg
)
{
}
public bool LoadPostData(
string postDataKey,
NameValueCollection postData
)
{
return true;
}
#endregion
}
-- modified at 8:45 Monday 4th December, 2006
|
|
|
|
|
Nvm - got a solution on the ever-helpful http://forums.asp.net - changing the exposed control type to PlaceHolder instead of Control fixed it. Good enough solution.
|
|
|
|
|
Hi I have a page in which I have used another page in . In that <ifram> page there is a text box i-e named txtPO. How can i access that txtPO in that Page in which <iframe> page is used.
|
|
|
|
|
dear,
you can access it from javascript
document.frames['IFRAMEID'].document.getelementById('txtPO').value
where IFRAMEID is the id of your iframe
Happy Coding
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
hi
i want to display an image from datadase in a TemplateColumn, and when i click on this image an event will happend (like: another image is displayed
in another place in the same page)
plz help me
thanks for ur time :rose
Rania
.net programer
|
|
|
|
|
This isn't a complete solution but hopefully it will get you started....
This is a brief sample of a datagrid I created in v1.1 that had a "View Details" image button in the 1st column of the datagrid. This image was the same for each row with an image filepath that I hardcoded:
1) datagrid id="dgrdSample"
2) Add OnItemCommand="dgrdSample_ItemCommand" to the datagrid tag
3) First column was a "ButtonColumn":
<asp:ButtonColumn ButtonType="LinkButton" HeaderText="Sample" Text="<img src='../images/viewDetails.jpg' border='0'>" CommandName="select"></asp:ButtonColumn>
4) Add this to your codebehind:
protected void dgrdSample_ItemCommand(Object s, DataGridCommandEventArgs e)
{
//Add your code here for whatever you wish to happen
}
Hope this helps get you started.
-Goalie35
|
|
|
|
|
thank u Goalie35
it is so helpful
but i want to make the imagebutton fetch the image url from the database
can u tell me how
thanks
rony
|
|
|
|
|
How to get the display of Datagrid in runtime.(C#+Asp.net)
i m not able to view the Grid.
Regards
Shriya
|
|
|
|
|
Hi,
This LINK[^] may help you out.
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
R u getting values from a database.
|
|
|
|
|
hi
give autogeneratecolumns=true in datagrid html form
regards
saravanan
|
|
|
|
|
Dear All
i'm using the query string to hold values between webforms but i'm facing a problem with special characters ther become something else
the % becomes / and some other code...
how can i get the query string varaibles through javascript and return them as they are?
tried the escape and unescape function but it also didn't work
here's a sample of the key i'm sending in the query string:
chvVXMSF1BzwcdoDe899FfSxnhSrmxrr219T6Uvjv7MjryZE5QSx69RqVW7LmyFVyGucC9iV%252FVFVTW830hbjoYEO0U%252BHQXDaf5txVcKGAWcr6a7Wo3ZSyFMF%252FxHXbjO5uWFScCM%252Bs8X57ihH5nanC9KeLTErLX3VopuPpNcK%252BLivM4mA9%252FVJ9aqYvuBS%252F4NsfLVZtFIsQbv0EOqkT4%252BLpv8Cej%252F%252F9zt7S3fW%252F1wLJ8gO0h%252BNdQTHiFq%252BSjXwtO9s7hcxzz1Gxr2OQV0%252BwO9zAJLLL5mkVLIXx2uaPXLhAbFLNMOxNPAlQpDFPFXJLfiYwfV7ucSPgqlU%252Fy3wjN2QKzyMVWj8%252BZ8GYuPGOndBsQ3SeCYrButJIMOMIGxWLRvs
i can't move it as is
Best Regards
3ala2
|
|
|
|
|
|
hi all.....
can anybody give some idea to display an hourglass until the pages get loaded into the frames of page.
in my page i have 4 frames and m displaying each frame with an aspx page.
i want to display an hourglass until the last page get loaded.
one thing there is no order of pages loading in.
so pls give me some idea
thanks in advance
|
|
|
|
|
Dear,
you can use the javascript setTimeOut function which will check the frames if loaded every specific time ( you set the specific time) below is an example
window.onload = function() {setTimeout(\"if(self.parent.frames['FRAME3'].document.readyState!='complete'){document.body.style.cursor = 'Wait';}else{document.body.style.cursor = 'default'}",100)}
Repeat this for each frame you have.
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
thanks for quick reply.
m not clear can u pls explain me where should i need to write this.
thank you
|
|
|
|
|
Dear,
first create a function in javascript
function checkloaded(id1,id2,id3,id4)
{
setTimeout("if(self.parent.frames[id1].document.readyState!='complete' | self.parent.frames[id2].document.readyState!='complete'| self.parent.frames[id3].document.readyState!='complete' |self.parent.frames[id4].document.readyState!='complete'){document.body.style.cursor = 'Wait';}else{document.body.style.cursor = 'default'}",100)}
}
now onload in your tag, call this function and send your 4 frames id as parameters
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
thank u very much
but i dont have body tag.
thank you
|
|
|
|
|
my page is like this
where should i call onload ?
thank you
|
|
|
|
|
what is the difference between codebehind and src in @page directive.
Thanks in advance,
Regards,
Prya
|
|
|
|
|
Dear,
if you are using Visual studio you have to use the codebehind directive because VS precompiles your application. if you use src, it means that you want to compile it straight away. if you using another developement suite u are required to use the src directive
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx[^]
Best Regards,
Haissam Abdul Malak
|
|
|
|