|
Hi All, I am a newbie in dotnetnuke. My problem is that I have a module with download option. What I want to do is that when an unregistered user click on that link he will not be able to download the file. i really dont know how to acheive this task. Please help.
Thanks in advance...
modified on Wednesday, March 24, 2010 6:22 AM
|
|
|
|
|
Dear Experts,
We have developed a site which runs fine in 14 inch monitor. But it was not looking fine in 20 inch monitor. The control are not in proper place as in 14 inch monitor. is there any solution for this........
|
|
|
|
|
Instead of specifying the width of the controls and containers (div, tables) in pixels, use percentage.
Like 100% to the main container, and relative width in % to inner controls
Regards,
Prakash Kalakoti
|
|
|
|
|
Check the screen resolutions. It is the resolution not the monitor size that matters.
These days I design for 1024*768 and make sure it either looks okay, or resizes appropriately at other resolutions.
|
|
|
|
|
Hi,
Use Percentage for page width instant of pixel...
|
|
|
|
|
The same answer already posted long back before you.
|
|
|
|
|
Hi All,
In my Webpage i have a Button control.
On the button Click i have following functionalities
1.To show the "progress bar" Icon during retrieving data from Sqlserver Database..
2.After retrieving a Data from DB a csv report will be generated.
For Point 1--the below is the code i have used
Code snippet for busy Icon:
============================
Response.Write("<div ID='mydiv' STYLE='position:absolute;z-index:5000;top ;left ;width:100%;height:100%;'><table cellspacing='0' cellpadding='0' border='0' align='center'><tr><td class='copy' align='right' height='260'><img src='./processingimage.gif' width='0' align='absmiddle'></td></tr><tr><td class='copyblack' style='font-family:arial;font-size:14px' align='center'><img src='./processingimage.gif' border='0' align='absmiddle'><br><br>" + strBusyMessage + "<br>" + strReportCreteria + "</td></tr></table>")
Response.Write(" ")
Response.Write("</div>")
Response.Write("<script> var mydiv = document.getElementById('mydiv');</script>")
Response.Write("<script language=javascript>")
Response.Write("function StartShowWait(){mydiv.style.visibility ='visible';}")
Response.Write("function HideWait(){mydiv.style.visibility = 'hidden';}")
Response.Write("StartShowWait();</script>")
'Page.Session.Add("SessionID", Session.SessionID)
Response.Flush()
=================================
For point 2: please see the below code snippet
Code snippet to generate CSV report.
==================================================
Response.AddHeader("Content-Disposition", "attachment; filename=" + CSVName)
Response.ContentType = "application/csv"
Response.Write(CSVContent)
Response.Flush()
Response.Close()
=====================================================
when coming to above mention code line(bold one in above snippet) i am getting the below error
"Server cannot append header after HTTP headers have been sent"
Please help me in resolving the above error.
|
|
|
|
|
I need to fetch the screen dimensions of blackberry and align the screen accordingly in ASP.NET application.How to do that?My current page alignment is distorts for different blackberrys
|
|
|
|
|
Hi
I have a page which holds a custom webcontrol and a usercontrol. I need to reference of webcontrol in usercontrol class. So, I make the declaration of webcontrol as public in page class. But, when I do “this.Page.”, I don’t see the webcontrol listed in list provided by intellisense. Most probably, I am missing something.
In an asp.net page, how to get a reference of a custom webcontrol from a usercontrol?
Please advise. Thanks
Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
while using that custom control or user control in aspx page, you must have provided the "ID" of the control right? You should get that control just by refering to ID. No need of call "Page.(....)"
If you are loading dynamically from code behind still you get it directly by "ID" property's value.(of course in that case you need to set the ID property then while dynamically adding that to page control)
Let me know whether you get that!!
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi
I have an object which is a collection, which is a collection, I use linq to group the data based upon a value, and then I bind the data to the gridview data source. This gives me a gridview per group, which is exactly what I want. However, when the gridview is displayed what I am seeing is one: not the correct number of rows for the first group, and two, more importantly I am seeing rows which should be in the next group. It is though it is not filtering correctly, or the gridview is not binding correctly.
I have checked the linq in debug and seems fine, I have checked the data in the collection object, and this is fine. So, I am lost as to what is going on.
Can anyone help me!
Collection<DeptGroups> depts = this.Model.GetGroups();
var dept = (from deptToSelect in depts Select dept.name).Distinct();
foreach(string deptToFilter in dept)
{
var country = from worldRegion in depts where worldRegion.name = deptToFilter select worldRegion;
gvDept.DataSource = country;
}
|
|
|
|
|
I’m having an issue with the consistent styling of an asp.net MVC application in IE across different web SERVER implementations (different server versions). (All implementations are Windows based.)
All of the content is there. Colors, fonts, etc. seem to be fine, but it is positioned differently - in some cases drastically. This is the case for “all” pages on the site.
A diff of both the served HTML and the CSS files show a binary equality.
The problem shows up when rendering the page in:
a) IE8 (or IE7) served from a Visual Studio 08 Cassini server
b) IE8 (or IE7) served from an IIS6 server
The problem does NOT appear in FireFox 3.6.x or Chrome 4.1.x (the pages are identical in appearance).
The IE/Cassini pages appear in line with FF and Chrome.
The IE/IIS6 pages are out of whack.
The implication is that the problem is related to IE.
The test is performed on two different tabs in the same instance of IE.
The security zones are the same for each page (Local Intranet).
There HAS to be a difference, somewhere. Right? Any ideas on where to look next?
- Thanks -
|
|
|
|
|
Hello, i think this problem is related with IE compatibility.
To solve, set a meta tag to force IE compatibility.
Regards.
More info:
Rofl_Waffler: http://www.redditgadgetguide.com/r/web_design/comments/ar5fs/help_what_would_cause_the_same_page_with_the_same/[^]
Local pages and intranet sites run in IE7 mode by default. This is a backwards compatibility feature to make corporate intranet sites continue working. You can disable this feature from "page -> compatibility view settings -> display intranet sites ..." or you can use a meta tag to explicitly choose the version to use. The meta tag must appear before any external stylesheets or javascript.
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> (will use the latest engine in future releases of IE)
|
|
|
|
|
protected void grdOutput_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Record record = (Record)e.Row.DataItem;
if (record.StatusMessage.Length > 50 )
{
((Label)e.Row.FindControl("lblStatusMessage")).Text = record.StatusMessage.Substring(0, 50);
}
}
The markup
<form id="form1" runat="server">
<div>
<asp:GridView ID="grdOutput" runat="server" Width="895px" AllowPaging="False"
AutoGenerateColumns="False" onrowcommand="grdOutput_RowCommand"
onrowdatabound="grdOutput_RowDataBound" BackColor="AntiqueWhite"
onrowcreated="grdOutput_RowCreated">
<Columns>
<asp:BoundField HeaderText="NotificationID" DataField="NotificationID" Visible="true"/>
<asp:BoundField HeaderText="Notifier" DataField="Notifier" visible="true" />
<asp:TemplateField HeaderText="StatusMessage" Visible="true">
<ItemTemplate>
<asp:Label ID="lblStatusMessage" runat="server" Text='<%# Bind("StatusMessage") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField Text="RowClick" CommandName="RowClick" visible="false"/>
</Columns>
<FooterStyle BackColor="SlateGray" />
<HeaderStyle BackColor="SlateGray" />
<AlternatingRowStyle BackColor="LightSteelBlue" />
</asp:GridView>
</div>
<div style="background-color: Gray; width:800px; Overflow:auto;">
<asp:ListBox ID="lbxOutput" runat="server" Height="31px" Width="795px" />
<asp:TextBox ID="hdnActiveRow" Visible="true" runat="server" />
</div>
</form>
e.Row.FindControl("lblStatusMessage") is returning null and I have absolutely no idea why. Any clue?
"I need build Skynet. Plz send code"
|
|
|
|
|
d'oh.
...if you're going to try and access a control in a GridView, don't do this in RowCreated lol:
Record record = (Record)e.Row.DataItem;
TableCell cell = e.Row.Cells[2];
cell.Text = record.StatusMessage;
(The code was prototype code that I had commented out. I must have accidentally had it selected when I uncommented code that surrounded it)
...but can anyone explain why the Controls collection is mutilated when accessing the cell directly?
"I need build Skynet. Plz send code"
|
|
|
|
|
This happens because when you use a control(here a label) inside another control which implements "INamingContainer"( here GridView) , the ID generated becomes diferrent ( you can see that generated ID is an hierarchical name ) hence with provided ID ( here lblStatusMessage) you dont get that control.
FindControl does not locate that only because the ID value you have provided has been changed at runtime.
Thanks,
Arindam D Tewary
|
|
|
|
|
So assigning the cell Text as in...
Record record = (Record)e.Row.DataItem;
TableCell cell = e.Row.Cells[2];
cell.Text = record.StatusMessage;
...causes the control that is contained in that cell to be reassigned an id? That doesn't make much sense to me, but I would love to hear more detail as to why that is the case.
Whenever I comment out my assignment "cell.Text = record.StatusMessage", the e.Row.FindControl("lblStatusMessage") lookup processed like a champ.
"I need build Skynet. Plz send code"
|
|
|
|
|
<script type="text/javascript" language="Javascript"
src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.3.2.min.js"></script><script type='text/javascript'>
if (typeof jQuery == 'undefined') {
document.write(unescape("%3Cscript
src='/script/JS/jquery-1.3.2.min.js' type='text/javascript' %3E%3C/script%3E"));
}
I found above code in CP home page, just want to know is there any benefit referring the jQuery framework from microsoft website at the first place?
Regards,
Prakash Kalakoti
|
|
|
|
|
JQuery has nothing to do with Microsoft, asp.net.
'jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript."
http://jquery.com/[^]
I would suggest doing a little research
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark, sorry if the question was not clear. I know jQuery and using it from last 2 years, actually I want to ask why the jQuery file is referenced from Microsoft website instead of a local js reference.
In the code it is checked that if the file in not available at MS site then load it from a local path. Do we get any benefit doing this?
Regards,
Prakash Kalakoti
|
|
|
|
|
Two reasons could be Consistency, the same version can be referenced. Cache, the js file could be cached by ajax.com.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks, caching seems to be more appropriate reason to me.
Regards,
Prakash Kalakoti
|
|
|
|
|
I forgot about this.
http://www.asp.net/ajaxlibrary/cdn.ashx[^]
"By taking advantage of the Microsoft Ajax CDN, you can significantly improve the performance of your Ajax applications. The contents of the Microsoft Ajax CDN are cached on servers located around the world. In addition, the Microsoft Ajax CDN enables browsers to reuse cached JavaScript files for Web sites that are located in different domains."
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
any one please explain how to deploy the web pages in windows server
|
|
|
|
|