|
These are very broad topics, can you be a little more specific as to what you trying to accomplish and when help you need?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Pls if you don't mind i'm an upcoming programmer and just want to venture into multithreading and message queing so i can use them in building some type of applications sooner or later. im still a student and ready to learn. if i can get taught by using a real life exaple or walk through i can always apply to any kind of large application i may want to build.
IT'S GREAT TO BE HERE
|
|
|
|
|
Think of a windows app that need to read a large amount of data, or a large file, while the continues to do other tasks. This is a classic use and example of multithreading. The data or file access must be done on a separate thread to keep the UI responsive. If you want to add complexity, have the UI report progress of the operation.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi
I have used this dll(PDFLibNet.dll) to load and convert a specefic page of a PDF file to png
in a windows project it works properly but in asp.net website a problem raised.
after using this method by user like 10 or 20 or ... times that is not regular it can not read text from Pdf file and only converts the picture in a specefic page .
my code is like this :
PDFLibNet.PDFWrapper pdfDoc = new PDFWrapper();
pdfDoc.RenderDPI = dpi;
pdfDoc.LoadPDF(root);
Guid outGuid = Guid.NewGuid();
string output = destPath + "\\" + outGuid.ToString() + ".png" ;
PDFLibNet.PDFPage pdfPage = pdfDoc.Pages[pagenumber];
Bitmap bmp = pdfPage.GetBitmap(dpi , true);
bmp.Save(output, System.Drawing.Imaging.ImageFormat.Png);
bmp.Dispose();
pdfDoc.Dispose();
return outGuid.ToString() ;
tanks for your attention.
|
|
|
|
|
You are running your application from VS IDE or From IIS ?
Cheers !
Abhijit
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I have ran this in both VS AND IIS
it is same in error
|
|
|
|
|
use ExportJpg(...)
PDFLibNet.PDFWrapper wrap = new PDFLibNet.PDFWrapper();
wrap.RenderDPI = 85.0;
wrap.LoadPDF(@"E:\Sources\usb_20\OTG Supplement v1.2.pdf");
PDFLibNet.PDFPage page;
foreach (int i in wrap.Pages.Keys)
{
file = dir + i + ".jpg";
page = wrap.Pages[i];
try
{
wrap.ExportJpg(file, i, i, 75.0, 100, 1000);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
|
|
|
|
|
public Image ExportPageAsImage(string pdffileName,int pageNumber)
{
PDFWrapper m_pdfWrapper=new PDFWrapper();
PDFPage m_page;
m_pdfWrapper.LoadPDF(pdffileName);
m_dpi = 96;
m_page = this.m_pdfWrapper.Pages[pageNumber];
Bitmap bmp = m_page.GetBitmap(m_dpi);
return (Image)bmp;
}
RVN
|
|
|
|
|
I need to change ReadOnly from false to true for one column in GridView depending on who the user is. In my particular case it is a BoundField (also I would like to know how to do it for a Template field as well) and DataField is "dteRequired". I would like to code something like that right in the Page_Load handler:
GridView1.Columns["dteRequired"].ReadOnly = true;
but I am getting compile errors...
Any idea?
Thank you.
|
|
|
|
|
For your requirement, use ItemTemplate Field and in have a Textbox and Label
and according to the user, show/hide either label or textbox in rowdatabound of gridview
|
|
|
|
|
You need to to do this in the RowCreated event.
Use something like this (adjust to suit):
protected void Grid1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e == null) { throw new ArgumentNullException("e"); }
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].ReadOnly = false;
}
}
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
How can I generate a random string of given length in an asp.net web page ?????/?
|
|
|
|
|
int length = 10;
string output = string.Empty;
char c = new char();
Random rnd = new Random();
do
{
c = Convert.ToChar(rnd.Next(Char.Parse("z")));
if(Char.IsLetter(c))
{
output += c;
}
} while(output.Length < length);
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have a asp radiobutton on my page and when I display the page it appears that the border for the radiobutton is 50px and the text for the radiobutton is shoved down to the next line. I have the markup for the radiobutton below. When I use a standard HTML radiobutton it appears correctly on the page. See markup below:
Select a button
<asp:radiobutton id="radio2" runat="server" width="20px" text="Milk">
Any help would be great!
Thanks,
Steve
|
|
|
|
|
Steve Holdorf wrote: <asp:radiobutton id="radio2" runat="server" width="20px" text="Milk">
The width that you set here is too less.It must be atleast 50px according to your text.Try with the width as
Width="50px"
Let me know if any doubts.
|
|
|
|
|
OK, I moved the radiobutton out of all my div's using css and still get the same thing. The border is still about 50px and the text displays on the next line. when I select the area around the button I can see it's box and the border is wide. ???????
|
|
|
|
|
Steve,
If you give your width little bit large it will work fine. I have tested with 50px Its coming properly withput having any issue.
Now, If you have changed the width and still faceing the same problem, then I guess you have some problem with CSS.
See, when you are using RadioButton is aspx page, its renders as follows :
<asp:RadioButton ID="RadioButton1" runat="server" Width="50px" Text="milk" />
Render as :
<span style="display: inline-block; width: 50px;">
<input id="RadioButton1" type="radio" value="RadioButton1" name="RadioButton1"/>
<label for="RadioButton1">milk</label>
</span>
Which may causes the problem. So please check you css for input and label conntrol.
One alternatvie soluation that you can go for is, use Table. Put Radiobutton in one one Cell and data in other cell. Hope you got my point.
Please let me know if you have any issue.
Thanks !
Cheers !
Abhijit
<b>My Blog :</b> <a href="http://abhijitjana.net">http://abhijitjana.net</a>
|
|
|
|
|
In my css I had a input element with width=200px and when I commented it out it worked. CSS can make your pages great but can also be a pain. Thanks for all of the advice guys.
Steve Holdorf
|
|
|
|
|
Yes, sometimes its creates pain and very difficult to find out too.
Thanks !
Cheers !
Abhijit
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi all,
I am looking for an e-learning platform (opensource)in asp.net where I can develop the e-learning applications with scorm compatibility.
Any idea about it,
thanks in advance
|
|
|
|
|
|
I am using asp.net 2.0 and ajaxPro in my web application.
1. How can bind my dropdown inside ajaxPro method, without using HtmlTextWriter?
Is it possible?
All the server controls are null inside the ajaxPro method.
2. So, i have created dynamic server controls inside the ajaxPro method and used HtmlTextWriter and rendered in javascript. Here in javascript, i can't able to get this dynamic controls by using getElementId method.
document.getElementId(asp.net control id + "ControlId");
but it returns null.
thanx in advance!
Thanks & Regards,
Jeneesh K. Velayudhan
|
|
|
|
|
jeneesh k. wrote: How can bind my dropdown inside ajaxPro method
You can't, databinding is done during page rendering by the ASP.NET engine.
jeneesh k. wrote: All the server controls are null inside the ajaxPro method.
Of course they are. You need to understand the page lifecycle and ajax calls.
Basically, you seem to have no clue about what Ajax is and how to use it. Please do us all, including yourself, a favor and research and understand the technology before trying to use it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi, I have to make server calls from client side by taking the value from first combo need to populate the second one. dont use selected change event.
How it is possible????
Thanks & Regards,
Jeneesh K. Velayudhan
|
|
|
|
|
I would recommend moving to ASP.NET AJAX which is built into
Visual Studio 2008 and available as additional feature pack for
Visual Studio .NET 2005. It provdes an update panel which can
bind your controls during an ajax call, here is a simple example ...
<%@ Page Language="C#" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
DropDownList1.Items.Clear();
String[] ds = {"hi","sup"};
DropDownList1.DataSource = ds;
DropDownList1.DataBind();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
<style type="text/css">
#UpdatePanel1 {
width:300px; height:100px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="padding-top: 10px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<fieldset>
<legend>UpdatePanel</legend>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<br />
</div>
</div>
</form>
</body>
</html>
|
|
|
|