|
Start from here: Generating ASP.NET Images on the Fly Article[^]
Sample:
Dim oBitmap As Bitmap = New Bitmap(468, 60)
Dim oGraphic As Graphics = Graphics.FromImage(oBitmap)
Dim oColor As System.Drawing.Color
Dim sColor As String = Request("BackgroundColor")
Dim sText As String = Request("Text")
Dim sFont As String = Request("Font")
Dim oBrush As New SolidBrush(oColor)
Dim oBrushWrite As New SolidBrush(Color.White)
oGraphic.FillRectangle(oBrush, 0, 0, 468, 60)
DrawString(String, Font, Brush, FPoint)
Dim oFont As New Font(sFont, 13)
Dim oPoint As New PointF(5F, 5F)
oGraphic.DrawString(sText, oFont, oBrushWrite, oPoint)
oBitmap.Save(Server.MapPath("generated_image.jpg"), ImageFormat.Jpeg)
//Response.Write("View the generated image <a target=""_blank"" href=""generated_image.jpg"">here</a>")
Response.ContentType = "image/jpeg"
oBitmap.Save (Response.OutputStream, ImageFormat.Jpeg)
|
|
|
|
|
i'm the beginner with crystal report!!!!
can anybody help me for generating crystal report?
i'm having problem like OLE DB (ADO) in that no items found ?
please help me ASAP!!!
|
|
|
|
|
|
Hi Experts,
I develop a small web application also i have hosted the server.
But i open the the url in the mobile browser is not in the formatted order as see in the PC browser.
Please help me.
Thanks,
Murugavel S
|
|
|
|
|
Murugavel Sadagopan wrote: But i open the the url in the mobile browser is not in the formatted order as see in the PC browser.
You have to consider the screen space availability of mobile and design accordingly. Following W3C standards, you can develop UI that will be compatible across browsers.
If you have some fixed width as per pc browser, it will have an affect on mobile.
Look here for various answers for similar question asked here: Similar question asked here[^]
Few more helpful links:
Browser Compatibility Application[^]
doubt regarding browser compatability[^]
|
|
|
|
|
You should give a try to bootstrap as your css. It provides Cross platform support, which eliminates major layout inconsistencies. Some of the benefits it provide are:
-12-Column Grid, fixed layout, fluid or responsive layout.
-Base CSS for Typography, code (syntax highlighting with Google prettify), Tables, Forms, Buttons and uses Icons by Glpyhicons .
-Web UI Components like Buttons, Navigation menu, Labels, Thumbnails, Alerts, Progress bars and misc.
-Javascript plugins for Modal, Dropdown, Scrollspy, Tab, Tooltip, Popover, Alert, Button, Collapse, Carousel and Typehead.
Below id the url to get examples and code :
http://twitter.github.com/bootstrap/[^]
Cheers by,
Anand Ranjan
|
|
|
|
|
Hi all,
I need to convert from HTML to PDF in asp.net.I called one HTML file from local server and load on a "div" control.This HTMl format contains some controls like Textbox,checkbox and object.when convert to PDF format i want to display these controls also in PDF.but i need to do without any(PDF conversion s/w).anybody knows this..share to me......
Thanks all,
|
|
|
|
|
I am trying to backup outlook pst while it is open but cannot backup pst...using vb.net
Please Give some help......in vb.net
|
|
|
|
|
mayur darji wrote: I am trying to backup outlook pst while it is open but cannot backup pst...using vb.net
Not just by code, you cannot create a copy of PST even manually (do copy-paste) if it is open in Outlook.
AFAIK, it's as per design and you need to close outlook to take backup of PST.
|
|
|
|
|
Hi All,
I develop a application with grid view. I have bind the values in gridview view (5 records).
in Gridview, I want 4th row in red color
and 5th row in green color.
Plz help me.
Thanks,
Murugavel s
|
|
|
|
|
You can do it on RowDataBound Event. Like This :
protected void Grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowIndex == 4)
{
e.Row.Style["Color"] = "Red";
}
else if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowIndex == 5)
{
e.Row.Style["Color"] = "Green";
}
}
}
|
|
|
|
|
Read about gridview event RowDataBound
You get access to grid's row at the time of bind. Based on the need, you can set styles and make changes in row. Try out.
|
|
|
|
|
Good morning, I would like to use the library MORRIS.JS with ASP. Net, I know I must be a JSON object, but not how to do it, someone help me? As an example if I do a query on a database and want to send the data in JSON format so the library becomes MORRIS.JS the graph, can someone give me a simple example? Thanks to this community and sorry my English is not very good, I would say that is bad enough, but I will understand!
Linkt to library http:
can someone give me a practical example? aspx file ... the. js and the sharp c if necessary. My question is not how to use this library, that is not passing data obtnega a query, to give an example, and once I have the results of the query, pass them morris.js to make a statistical graph perform the query. Anyone is encouraged to give me a practical example? In other forums ... I received answers, but very generic saying just theory, but would like to see something practical! .... Thank you all!...
|
|
|
|
|
Please avoid crosspost[^] - it is considered rude.
Pick a forum and stick to it.
|
|
|
|
|
No interpreter was a crosspost, I thought that the consultation was not visible as a forum as visited, did not get any satisfactory answer, thanks
|
|
|
|
|
Hello CodeProject Community, was wondering if you could help me with a GridView issue.
My goal is to fetch all unique/distinct values in a GridView. In this case, I'm trying to get all unique ProductCode.
My example GridView:
OrderID | ProductCode | Desc | Qty
001 | PC01 | Books | 1
002 | PC02 | Computers | 1
003 | PC03 | Bag | 1
004 | PC01 | Books | 3
005 | PC03 | Bag | 2
Thank you in advance.
Tags: VB.Net, ASP.Net, GridView
|
|
|
|
|
Andy Tek wrote: My goal is to fetch all unique/distinct values in a GridView. In this case, I'm trying to get all unique ProductCode.
Sounds good. So, where is the issue?
You need to use DISTINCT keyword in your query to fetch the record from database.
|
|
|
|
|
I want to let some users download some files from my website and I don't want them to see the physical path of the downloading file.
I moved the files in a folder outside of my web folder and use Response.WriteFile(filePath) to download them. this help me to hide the path but this method doesn't support resume download which I really want it.
So what method you recommend I use?
Thanks
|
|
|
|
|
Dear All,
I have multiple applications(build in asp.net) for them i have a single login page and later on the basis of links given user can launch any application (All web applications). Now i am planning to give any application to the user in which they can login (login once per day and need option to "remember me") i want that application must minimize to taskbar and later on the basis of certain events user must get popup displayed on his desktop or PC. Please help me and suggest me that where to start or what to do ......
ashish sharma
|
|
|
|
|
Sticky problem with a few WCF REST services on a production machine. All the services are fine across other servers, failing any interactions on one particular server with a 400 Error.
We have a couple of REST services contained in our basic webforms application. We're calling these via POST method from javascript (raw js, no jQuery). These services then use a standard service reference to call down to "real" WCF services (not restful). All seems fine on several dev machines and several other live sites, but for one of our sites, all we get out of the REST side of things are 400 (Bad Request) errors. We've tried various things:
Dropped a "Really simple rest" service onto the same server, call in the same way and works fine - so don't think it's a server issue.
Checked IIS config for things like wildcard maps etc - all seems to be the same as other servers.
Written a quick Powershell script to call - this also fails with a 400, so we think our JS side of things is OK.
Checked request format etc (JSON) in Fiddler - seems to be fine and the same as works on other servers.
Tried to create a new instance of our complete app on the same server - same problem, so it looks like it's something specific to our server side code in this app only, except the server side code is the same as the really simple service above - with one exception - we use code to create our binding object and endpoint rather than having them in web.config. The settings we use are however the same as per the standard info added when adding the normal service reference.
We're about running out of ideas on this one, so any pointers as to areas to look at would be greatly appreciated.
C# has already designed away most of the tedium of C++.
|
|
|
|
|
How to open twiiter login page using rest api v1.1 twitter
in asp.net
|
|
|
|
|
|
Hey, can anybody help me with this? I have the following code, I put the pop-up related part into an empty webform and that works fine, but in the form that I really want to have that, it doesn't work! there is no error showing what is wrong with this! (the script manager is on the master page). Any note or comments to help me to figure out what is wrong with it?!
here is the code:
/*for user code pop-up */
.confirm-dialog .base
{
BORDER-TOP: #ddd 1px solid;BACKGROUND: url(img/base.png) no-repeat left bottom;
PADDING-BOTTOM: 4px;MARGIN-LEFT: -11px;MARGIN-RIGHT: -11px;
PADDING-TOP: 4px;TEXT-ALIGN: center;
}
.modalBackground
{
background-color:Gray;filter:alpha(opacity=70);opacity:0.7;
}
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content2" ContentPlaceHolderID="headerContent" runat="server">
<script type="text/javascript">
function Popup()
{
var modalPopupBehavior = $find('ModalPopupBehavior1');
modalPopupBehavior.show();
}
</script>
<style type="text/css">
.confirm-dialog
{
margin-bottom: 0px;
}
</style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="phBody" runat="server">
<div class="PageDesc">
<asp:Localize ID="userCodesPageDescr" runat="server" EnableViewState="False"
meta:resourcekey="userCodesPageDescrResource1" Text="User Codes enable individual users to arm and
disarm your security system. Check 'Security Panel Access' to give a user local access so they can arm/disarm
through the system keypad. Uncheck it to remove local access temporarily - the code will still show
on the website. (Note that user codes must be 4 digits. Codes 0000 and 0001 are not allowed.)"></asp:Localize>
</div>
<div class="PageDesc" align="right">
<asp:LinkButton ID="lbtnRequestUserCode" runat="server" OnClientClick="Popup()"
meta:resourcekey="lbtnRequestUserCodeResource1"
CausesValidation="False">Request Panel User Codes</asp:LinkButton>
</div>
<div>
<asp:Panel ID="confirmPanel" runat="server" BackColor="White" Width="325px" CssClass="confirm-dialog"
meta:resourcekey="confirmPanelResource1">
<div style="background-color: #EEEEEE; font-weight: bold; padding: 5px 5px 5px 5px;">
<asp:Localize ID="Localize1" runat="server"
meta:resourceKey="locConfirmDeleteRc1" Text="Request User Codes from Panel"></asp:Localize></div><br />
<div style="padding: 0px 10px 15px 10px;">
<asp:Localize ID="Localize2" runat="server"
meta:resourceKey="ConfirmDeleteTextRc1"
Text="Are you sure you would like to replace the website user codes with the user codes from the panel?"></asp:Localize> <br /><br />
<asp:Localize ID="Localize3" runat="server"
meta:resourceKey="ConfirmDeleteTextRc1"
Text="<b>Note: Codes uploaded from the panel will overwrite those in the website if they are out of sync.</b> "></asp:Localize> <br /><br />
<br /><br />
<table width="100%">
<tr>
<td style="text-align: center;">
<asp:Button ID="butConfirmYes" runat="server" Text="Countinue" CssClass="styledbutton"
meta:resourcekey="butCountinue_userCode1" OnClientClick="Popup();"/>
</td>
<td> </td>
<td style="text-align: center;">
<asp:Button ID="butCancel" runat="server" Text=" Cancel " CssClass="styledbutton" meta:resourcekey="butCancel_userCode" />
</td>
</tr>
</table>
</div>
</asp:Panel>
<asp:Panel ID="pnlModal" runat="server">
<ajax:ModalPopupExtender ID="modalPopup" runat="server" BehaviorID="ModalPopupBehavior1"
CancelControlID="butConfirmNo" OkControlID="butConfirmYes"
PopupControlID="confirmPanel" TargetControlID="lbtnRequestUserCode"
DynamicServicePath="" Enabled="True" BackgroundCssClass="modalBackground" />
</asp:Panel>
</div>
<uc1:UserCodesControl ID="usercodes" runat="server" />
<asp:Panel ID="pnlCSNote" runat="server" Visible="False" CssClass="PageDesc"
style="margin-top: 10px" meta:resourcekey="pnlCSNoteResource1">
<p><span style="font-weight: bold">
<asp:Localize ID="labelNote" runat="server" EnableViewState="False"
meta:resourcekey="labelNoteResource1" Text="Note:"></asp:Localize>
</span>
<asp:Localize ID="userCodesNote" runat="server" EnableViewState="False"
meta:resourcekey="userCodesNoteResource1" Text="The changes you make on this page will not update the response information
in the central monitoring station. In order to make changes to the response information
stored at the central station, which is used to respond to alarm signals from your
account, you should contact your alarm dealer or the central station directly."></asp:Localize>
</p>
</asp:Panel>
</asp:Content>
|
|
|
|
|
Take out "CancelControlID" property and it should work.
There are no button with the ID "butConfirmNo"
|
|
|
|
|
Thank, it works!
but now I have the problem with button
butConfirmYes , since its onclick event doesn't fire! can anyone help me with this?!
<asp:Button ID="butConfirmYes" runat="server" Text="Countinue" CssClass="styledbutton"
meta:resourcekey="butCountinue_userCode1"
onclick="butConfirmYes_Click1" CausesValidation="False"/
>
and in cs file I have
protected void butConfirmYes_Click1(object sender, EventArgs e)
{
context.SelectedCustomer.Unit.Panel.RequestUserCodes();
ErrorManager.AddMessage((string)GetLocalResourceObject("Error_CommandSent"));
}
|
|
|
|