Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionHOW TO ANSWER A QUESTIONadminChris Maunder12 Jul '09 - 22:39 
Apologies for the shouting but this is important.
 
When answering a question please:
  1. Read the question carefully
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
  3. If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
  4. If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
 
cheers,
Chris Maunder
 
The Code Project Co-founder
Microsoft C++ MVP

QuestionHow to get an answer to your questionadminChris Maunder10 Nov '05 - 16:29 
For those new to message boards please try to follow a few simple rules when posting your question.
  1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
     
  2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
     
  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
     
  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
     
  5. Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
     
  6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
     
  7. If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
     
  8. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
     
  9. Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
     
  10. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
     
  11. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
     
  12. No advertising or soliciting.
     
  13. We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
 
The Code Project Co-founder
Microsoft C++ MVP

QuestionStart an async method inside an MVC action method.memberBrady Kelly10mins ago 
I have a view for import batches (headers, not details), which a link to start a new import. When the user clicks that link, I want to invoke my Import action method. Inside that standard, synchronous action method, I want to start an asynchronous task, and then redirect back to another view. That view will monitor the progress of the async task with ajax calls and update the view so the user can follow the progress.
 
Everything I can find goes into too much complexity with async action methods etc. which is overkill for me in the prototyping phase.
 
Suggestions and critique of what I want to do will be most welcome.
Questionanyone plz tell me which is free version of iTextSharp library?membermanoj.jsm2hrs 19mins ago 
anyone plz tell me which is free version of iTextSharp library for pdf file exporting?
QuestionMVC vs n-Tier ArchitecturememberBikash Prakash Dash6hrs 45mins ago 
Comparison of MVC & n-Tier Architecture
Give comparison regarding their
->Advantages
->Disadvantages
->Purpose of use
etc etc
AnswerRe: MVC vs n-Tier ArchitecturemvpRichard MacCutchan3hrs 55mins ago 
http://www.codeproject.com/Messages/1278599/How-to-get-an-answer-to-your-question.aspx[^].
Use the best guess

AnswerRe: MVC vs n-Tier ArchitectureprofessionalManfred R. Bihy3hrs 36mins ago 
Start here: Multitier architecture[^] and pay special attention to the subsection Comparison with the MVC architecture[^].
 
Regards,
— Manfred

"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian


Questioninstallation of visual vsn servermemberMember 87018139hrs 28mins ago 
hi experts,
i am trying to install vsn server 2.5.9 from the link http://www.visualsvn.com/visualsvn/download/[^]
while installing vsn server i was asked to choose port no(2 port nos are displayed 443 & 8443).i have chosen 443 port no for https.so what i did is i removed https & selected 443 for visual vsn.now vsn is working fine.the issue i am facing is i am unable to run my application on iis using http.when i run my application i am getting "the address is incorrect,type the correct address".but the address is correct in the address bar.how to overcome this problem?if i want to run my application using https what port n do i have to choose?could anyone help me pls...
QuestionValidation Question - HelpmemberWickedFooker16hrs 28mins ago 
Okay so very easy to validate an email in ASP and also very easy to validate that someone enters between 6 and 30 characters but can someone help me in making sure that BOTH are checked in a Custom Validation perhaps. What I have for example:
 
<asp:CustomValidator ID="CustomValidator1"  ClientValidationFunction="/^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$/" runat="server" 
                            ControlToValidate="txtUserName" ErrorMessage="CustomValidator" 
                            SetFocusOnError="True"></asp:CustomValidator>
 
I am sure it is something simple but just need to know. Right now all it is doing is just checking that the email is valid, but if nothing is on the field it checks nothing.
AnswerRe: Validation Question - HelpprofessionalManfred R. Bihy3hrs 27mins ago 
As found here: http://bytes.com/topic/asp-net/answers/623177-customvalidator-do-not-work-empty-fields[^] you should try the hint to set ValidateEmptyText[^] to true.
 
Regards,
— Manfred

"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian


QuestionMerging Two columns under same heading in Gridviewmemberpavithrasubbareddy20 May '13 - 2:40 
Hi Buddies,
 
I wanna to combine two columns with same heading using asp.net with c#.values i'm getting from database.
 
For example:
 
database retruning rows as
 
empid empname empdept empbranch
1 Suresh dev Bangalore
2 kavitha tester bangalore
3 Siva dev chennai
 

Required Result in UI is:
 
emp_personal emp_official
 
empid empname empdept branch
 
1 suresh dev bangalore
2 kavitha tester bangalore
3 siva dev chennai
AnswerRe: Merging Two columns under same heading in GridviewmemberDavid Mujica20 May '13 - 3:46 
Try concatenating the two columns in your select statement.
 
Example:
select empid empname + ' ' + empdept + ' ' + empbranch
GeneralRe: Merging Two columns under same heading in Gridviewmemberpavithrasubbareddy11hrs 39mins ago 
Hi David,
 
i don't want to merge values,need to show them in separate table under same heading
AnswerRe: Merging Two columns under same heading in Gridviewmembercyber_addicted6hrs 28mins ago 
SELECT ISNULL(empid, '') + ' ' + ISNULL(empname, '') AS emp_personal, ISNULL(empdept, '') + ' ' + ISNULL(empbranch, '') AS emp_official
FROM emp
 
check this query and please confirm me is this working for you or not?
QuestionAjax Cascading DropdownmemberLAIJU KHAN20 May '13 - 1:36 
I am using a CascadingDropdown for three dropdownlists for country,state and district.when the country is selected state will automatically get values,i have a tab index issue if the state value doesnt come on tabpress the control will on the fourth control that is after district dropdown.I had made tab index correctly any way to make it work nicely.If stae comes up with value then no problem.if it doesn't then irritating
lk

QuestionClearing Textboxes (Foreach) Not WorkingmemberMember 991209119 May '13 - 7:24 
Hi all. I am writing a program using Microsoft Visual Web Developer. I have 3 textboxes (TextBox1, TextBox2 and TextBox3) and a button. I want to use a foreach loop to clear textboxes.
 
For some reason this code doesnt work on a Webform. While debugging it, the debugger skips the line: "if (c is TextBox)" and so the textboxes dont get cleared. Here control = {ASP.default_aspx}
 
When I use the below code in Microsoft Visual C# with a windows form it works. What could be wrong?
 
Here is the code:
 
protected void Button1_Click(object sender, EventArgs e)
{
ClearTextBoxes(this);
}
 

public void ClearTextBoxes(Control control)
{
foreach (Control c in control.Controls)
{
if (c is TextBox)
{
((TextBox)c).Text = " ";
}
 

}
AnswerRe: Clearing Textboxes (Foreach) Not WorkingprofessionalRichard Deeming20 May '13 - 2:06 
Are your TextBoxes immediate descendants of the page? It's unlikely; you've probably got several layers of controls between them.
 
Try this:
public void ClearTextBoxes(Control control)
{
   foreach (Control c in control.Controls)
   {
      var textBox = c as TextBox;
      if (textBox != null)
      {
         textBox.Text = " ";
      }
      else if (c.HasControls)
      {
         ClearTextBoxes(c);
      }
   }
}



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: Clearing Textboxes (Foreach) Not Workingmembercyber_addicted6hrs 20mins ago 
try this code
 
protected void Button1_Click(object sender, EventArgs e)
{
ClearTextBoxes(Page.Controls);
}
void ClearTextBoxes(ControlCollection control)
{
foreach (Control ctrl in control)
{
if (ctrl is TextBox)
((TextBox)ctrl).Text = string.Empty;
ClearInputs(ctrl.Controls);
}
}
QuestionC#.Net Windows ApplicationmemberMohsin Afzal18 May '13 - 2:20 
I Want To Validate my Windows Project while User can not Share this project to another or in One year Project will be Expired
Like An Antivirus Program Expired after One or two months
D'Oh! | :doh:
AnswerRe: C#.Net Windows ApplicationprofessionalMohammed Hameed18 May '13 - 10:57 
I would suggest you to google like this: "implementing licensing for trial versions in windows applications"
Be a good professional who shares programming secrets with others.

Questionmvc bookmemberMember 870181318 May '13 - 1:13 
hi,
can anyone suggest me the best book for mvc4 pls
AnswerRe: mvc bookmembercyber_addicted6hrs 15mins ago 
http://it-ebooks.info/book/1617/
try this link to download the book on mvc4
GeneralRe: mvc bookmemberMember 87018133hrs 13mins ago 
hi,
thanks for replying
QuestionAccess Database, ASP/C# Drop Down List populating a Drop Down ListmemberWickedFooker17 May '13 - 15:00 
Ok this has sort of been asked before but also somewhat differently here. I have a regular drop down (not connected to a database) that just has the topics of subjects.
 
This is a sample of what I have:
 
<asp:DropDownList id="ddlcourseType" runat="server" 
                            onselectedindexchanged="ddlcourseType_SelectedIndexChanged" 
                            AutoPostBack="True">
                       <asp:ListItem Value="None">Please Select</asp:ListItem>
                       <asp:ListItem Value="Engl">English</asp:ListItem>
                       <asp:ListItem Value="Math">Math</asp:ListItem>
                       <asp:ListItem Value="Soci">Social Studies</asp:ListItem>
                       <asp:ListItem Value="Scie">Science</asp:ListItem>
                       <asp:ListItem Value="Hist">History</asp:ListItem>
                       </asp:DropDownList>
 
I want to make it so that when it changes the next part will search and select teachers that teach that specific subject. I am using an Access Database for connection.
 
I have pieced together some of what others did in an attempt to get it to work but no.
 
 protected void ddlcourseType_SelectedIndexChanged(object sender, EventArgs e)
    {
        OleDbConnection dbConn = null;
        OleDbCommand dbCmd;
        OleDbDataReader dr;
        String strConnection;
        String strSQL;
        string path = Server.MapPath("eAcademy_DB.mdb");
 
        string Teachable = Convert.ToString(ddlcourseType.SelectedValue);
        strConnection = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + path;
        dbConn = new OleDbConnection(strConnection);
        dbConn.Open();
        strSQL = "select * from tblEmployee where canTeach=" + Teachable;
 
        dbCmd = new OleDbCommand(strSQL, dbConn);
        DataSet ds = new DataSet();
                
        dbConn.Close();
        ddlTeacher.DataSource = ds;
        ddlTeacher.DataTextField = "emp_ID";
        ddlTeacher.DataValueField = "emp_ID";
        ddlTeacher.DataBind();
        ddlTeacher.Items.Insert(0, new ListItem("--Select--", "0"));
        if (ddlTeacher.SelectedValue == "0")
        {
            ddlTeacher.Items.Clear();
            ddlTeacher.Items.Insert(0, new ListItem("--Select--", "0"));
        }
    }
 
I think what I really need to do is make a for loop and have it iterate for the amount of teachers that are in the list, and then have it populate the list, but not sure how exactly to do this.
 
It is hanging up on the ds part each time. I know the databind is causing it so this is why I thought perhaps better to iterate this? Any help would be appreciated.
 
The values from the first list are in the tblEmployee for "T" Teachers that can teach those classes. So that is why I want to 2nd drop down populated with their names. Thanks!
AnswerRe: Access Database, ASP/C# Drop Down List populating a Drop Down ListprofessionalRichard Deeming20 May '13 - 2:02 
WickedFooker wrote:
strSQL = "select * from tblEmployee where canTeach=" + Teachable;

Your first problem is SQL Injection[^]. Never use string concatenation to insert parameters into a query; use a parameterized query instead.
 
WickedFooker wrote:
dbCmd = new OleDbCommand(strSQL, dbConn);
DataSet ds = new DataSet();
dbConn.Close();

Creating an OleDbCommand object isn't going to execute the query, let alone store the results in another variable. You could use ExecuteReader, iterate through the results, and add them to a DataTable, but it's much simpler to use a DataAdapter to do the work for you.
 

WickedFooker wrote:
if (ddlTeacher.SelectedValue == "0")
{
   ddlTeacher.Items.Clear();
   ddlTeacher.Items.Insert(0, new ListItem("--Select--", "0"));
}

Since you've just inserted an item with a value of "0" as the first item, this will most likely be the selected item. Even if your data-binding was working, this block of code will most likely throw away the results from the database and leave you with an empty list.
 

Try something like this:
protected void ddlcourseType_SelectedIndexChanged(object sender, EventArgs e)
{
   string path = Server.MapPath("eAcademy_DB.mdb");
   string connectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + path;
   string commandText = "SELECT * FROM tblEmployee WHERE canTeach = ?";
 
   var ds = new DataSet();
 
   using (var connection = new OleDbConnection(connectionString))
   using (var command = new OleDbCommand(commandText, connection))
   {
      // OleDbCommand uses positional, rather than named, parameters.
      // The parameter name doesn't matter; only the position.
      command.Parameters.AddWithValue("@p0", ddlcourseType.SelectedValue);
 
      var adapter = new OleDbDataAdapter(command);
      adapter.Fill(ds);
   }
 
   ddlTeacher.DataSource = ds;
   ddlTeacher.DataTextField = "emp_ID";
   ddlTeacher.DataValueField = "emp_ID";
   ddlTeacher.DataBind();
 
   ddlTeacher.Items.Insert(0, new ListItem("--Select--", "0"));
}



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Access Database, ASP/C# Drop Down List populating a Drop Down List [modified]memberWickedFooker20 May '13 - 5:34 
I just want to thank you for the help! This did the trick. I was able to populate the 2nd table with perhaps the smallest of changes.
 
string commandText = "SELECT * FROM tblEmployee WHERE canTeach = " + ddlcourseType.SelectedValue;
 
I removed the select on the bottom and instead put it in the page load since it is more needed for looks when the page loads. Thanks again for your help. I am certain I will be back for more Smile | :)
 
REVISED: I see your warning about String concatenation. I will change it back. I went back to the way you originally posted it!

modified 19 hrs ago.

AnswerRe: Access Database, ASP/C# Drop Down List populating a Drop Down Listmembercyber_addicted6hrs ago 
i think you are missin to fill your dataset your command object not executing use
 
DataSet ds = new DataSet();
OleDbDataAdapter adapter = new OleDbDataAdapter(dbCmd)
 
adapter.Fill(ds); 
 
after
dbCmd = new OleDbCommand(strSQL, dbConn); 
 
then it fill dataset and your debug will show your dataset contain value.
Questionhow to write sql's not in operator using linq to entities 4.0 [modified]memberindian14317 May '13 - 7:14 
Hi All,
 
I have an asp.net application in which I am using two tables, Table1 and Table1Staging. Staging table data is updated every month.
And both have the same columns except the identity columns for the two tables are different. The reason for that is Table1 is transactional table so that we have to use an Identity columnfor that, here we are doing it with Unique Identifier. And there is an identity column in Staging table as auto increment integer for the sake of Entity Framework.
They both have a unique contraint column called clientId on which I am going to write all the logic to update or modify.
 
Now my question is I want to get all the rows in the staging table whose clientid exists in staging table but doesnt exist in transactional table, similar to not in operator in SQL Query.
 
Please if somebody can help me that would be really helpfull. I am searching from my side also. But if someone can help me its really great.
 
Thanks in advance.
Thanks & Regards,
 
Abdul Aleem Mohammad
St Louis MO - USA


modified 3 days ago.

AnswerRe: how to write sql's not in operator using linq to entities 4.0membermark merrens20 May '13 - 6:11 
See here[^]. Couldn't you call a stored procedure or even a view to do the heavy lifting?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
 
me, me, me
me, in pictures

QuestionEF:How to link Expressions in order to generate an OR/AND Linq query [modified]memberClodetta del Mar17 May '13 - 1:44 
Hi @all Smile | :)
I´m new to Expressiontrees and their invocation...
but they seem to be really mighty and useful...
I know that one can extend expressiontrees, but up until now I wasn´t been able to fully comprehend how to do that..
practically I want to "convert" this lambda into an expressiontree:
(o => o.LognName == name) 
 
and I do that by this Wink | ;-)
Expression<Func<Users_UserAccount, bool>> whereLogonName = LinqExtender.DynamicLinq.BuildOrTree<Users_UserAccount, string>(LogonName, UserAccount => UserAccount.LogonName);
            
so far so good. I also know that I now can query multiple users... fine thing... D'Oh! | :doh:
what´s really cool about this is, that expressiontree returns whatever you need takes any type of parameter... a fine thing would be if I was able to pass the correct "sql/linq" query to it... Dead | X|
to be honestly, my desire goes for this:
(o => o.LognName == name && o.LogonPW == "12345") //dumb pw

 
now my question is:
how to link different params in an expressiontree?
I heard about
Expression.Or
Expression.And
and am using it, but I feel that this does not function properly and as desired...
here´s my function of the treebuild:
public static Expression<Func<TValue, bool>> BuildOrTree<TValue, TCompareAgainst>(
        IEnumerable<TCompareAgainst> wantedItems,
        Expression<Func<TValue, TCompareAgainst>> convertBetweenTypes)
        {
            ParameterExpression inputParam = convertBetweenTypes.Parameters[0];
 
            Expression binaryExpressionTree = BuildBinaryOrTree(wantedItems.GetEnumerator(), convertBetweenTypes.Body, null);
 
            return Expression.Lambda<Func<TValue, bool>>(binaryExpressionTree, new[] { inputParam });
        }
        
 
I've found that on the interwebs...it´s NOT mine...but with very few changes, I've also implemented the AND-equivalent. whoa... Laugh | :laugh: what an effort... Shucks | :->
so, to put long things short:
how to combine the both of them to achieve the desired query?
 
thanks in advance!
what a cool community Thumbs Up | :thumbsup: Smile | :)
[edit]
forgot that:
private static Expression BuildBinaryOrTree<T>(
        IEnumerator<T> itemEnumerator,
        Expression expressionToCompareTo,
        Expression expression)
        {
            if (itemEnumerator.MoveNext() == false)
                return expression;
 
            ConstantExpression constant = Expression.Constant(itemEnumerator.Current, typeof(T));
            BinaryExpression comparison = Expression.Equal(expressionToCompareTo, constant);
 
            BinaryExpression newExpression;
 
            if (expression == null)
                newExpression = comparison;
            else
                newExpression = Expression.OrElse(expression, comparison);
 
            return BuildBinaryOrTree(itemEnumerator, expressionToCompareTo, newExpression);
        }
 
sorry Big Grin | :-D
ps:hopefully I dove into the correct forum... Sniff | :^)
 

aaargh, ultraedit:
addendum:
LogonName in the lambda was of type string, the Expressionparam is of type string[]
addendum 458:
as one might suspect:my math knowledge is not that sophisticated... the term binarytree is familiar to me since 4 days or 5... D'Oh! | :doh:
but, i´m somewhat able to use it...
just like luke skywalker and his lasersword...
he is capable to use it as a weapon, but is he able to assemble it!? Big Grin | :-D Cool | :cool:

modified 4 days ago.

Answer[solved?]the concrete calling...the priority problem [modified]memberClodetta del Mar17 May '13 - 2:51 
once more I´ve forgotten something...namely the calling of that expression:
Expression<Func<Users_UserAccount, bool>> whereLogonName = LinqExtender.DynamicLinq.BuildOrTree<Users_UserAccount, string>(LogonName, Users_Users => Users_Users.LogonName);
Expression<Func<Users_UserAccount, bool>> whereLogonPW = LinqExtender.DynamicLinq.BuildAndTree<Users_UserAccount, int>(siteparam, Users_Users => Users_Users.LogonPW);
 
Users_UserAccount medProOrignal = ce.Users_UserAccount.Where(whereLogonName).Where(whereLogonPW ).First();
                
            
but I found out, that there´s a 'priority-problem', when using .First();
but that´s so obvious...
consider the following:
two users:
user a:
UID:1 logonname: gargamel PW: a
user b:
UID:2 logonname: gargamel PW: b
 
actually I've overseen the fact that I was using .First()
.First() will simply take UID1 becoz it´s the first one found...
now I've tried it with .Single() and it returns the desired user...
but what left me dumb is the fact, that I can´t see the way this query get´s prioritized in terms of params... Confused | :confused:
 

actually, I hope my question is considerably clear and that I forgot nothing... D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh:
[eeedit]
I "profiled" it in SQLM MGMT Profiler but i´m veeery weak in SQL... no clue at all.. Thumbs Down | :thumbsdown:

modified 4 days ago.

QuestionHow to use different fonts?memberJassim Rahma16 May '13 - 10:15 
Hi,
 
I have seen in some website they use different fonts than the standard. For example:
 
.yakoutb
{
    font-family: 'Yakout W20 Bold';
}
 
How can I do this?
 

Technology News @ www.JassimRahma.com

 


AnswerRe: How to use different fonts?mvpRichard MacCutchan16 May '13 - 21:20 
See http://www.w3schools.com/css/css_font.asp[^].
Use the best guess

AnswerRe: How to use different fonts?memberJitendra Parida198720 May '13 - 1:02 
body
{
font-family:Arial, Helvetica, sans-serif;
}

QuestionHow to Open Datalist Link Button in New Tab in browsermemberMember 998801815 May '13 - 21:35 
Hi,

I have a Datalist Which have some linkbuttons which redirects to other page with querystring .
on click it is redirecting to other page with QueryString.

If i am right click on the datalist linkbutton and try to open in new tab, only blank page is opening.

Guys if u have some solution regarding this please help me.

Regards,
Mrityunjay
AnswerRe: How to Open Datalist Link Button in New Tab in browserprofessionalRichard Deeming16 May '13 - 1:32 
Don't use a LinkButton[^] for this; use a HyperLink[^] instead.
 
Clicking a LinkButton will cause the current page to post back to itself and run through the entire page lifecycle. Your code will then call Response.Redirect, which will return an HTTP 302 response telling the browser to request a different page.
 
Clicking a HyperLink will cause the browser to request the correct page directly.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


Questionc# code to download .xlsm filememberSachin Adsul15 May '13 - 21:20 
need to download file when user click on file .
QuestionPlease Help With Various Methods of Optical Character Recognition which can be used for successful Conversion??memberMember 1001074815 May '13 - 20:52 
I need a freeware or the any .dll or any project that can take a pdf as input and convert the images inside the pdf into a text (.txt ) fromat. and the programming language used is C#
 
This can be done in two ways:-
1)Take Input pdf and Extract images.--1st API.
2) Take the extracted images and convert to .txt & also convert the text inside the pdf to plain text(.txt) -- 2nd API.
 
OR 2nd way :-
1) Take pdf input and directly extract text from images as well as the text inside the pdf.
 

------------------Please HELP------
Thanks a lot.
~Regards
Kaushal Behere
kaushalpbehere@gmail.com
kaushalpbehere@hotmail.com

GeneralMessage Automatically RemovedmemberLalit24rocks15 May '13 - 20:16 
Message Automatically Removed
QuestionHtml to PDFmemberDenzil_Sdn15 May '13 - 19:56 
Hi people,
 
Could you please help me on how to convert an html document to a pdf document. I need like a free third party tool that can do the job. I've tried iTextsharp but it won't copy the styles from the html document to the pdf file. I've also tried Winnovative, but it prints out a watermark specifying that I am using a demo version.
 
I need a solution that can convert the file to pdf without the watermark but with the styles. Thanks a lot in advance guys.
 
Kind Regards,
Denzil.
AnswerRe: Html to PDFprofessionalMohammed Hameed18 May '13 - 10:59 
Not sure but just try this: http://www.evopdf.com/[^]
Be a good professional who shares programming secrets with others.

GeneralRe: Html to PDFmemberDenzil_Sdn19 May '13 - 20:37 
Hi Mohammed, I've also used Evo, but it's a demo version, and the watermark specifying that it's a demo version still prints out on the output.
GeneralRe: Html to PDFprofessionalMohammed Hameed19 May '13 - 20:46 
You can try its trial period till it expires and if it fits for your requirement fully then you can think of purchasing the license.
Be a good professional who shares programming secrets with others.

Questionasp.net with silverlightmemberjunkyy15 May '13 - 11:01 
I was giving a project to remove all silverlight components from a website. my question is this possible or should I just rewrite the site as an asp.net wed application
QuestionChat Box ComponentmemberMember 1005410915 May '13 - 2:33 
Hi, I need Chat box component (like as FB chat room) for a social network site.
AnswerRe: Chat Box ComponentmemberJasmine250115 May '13 - 4:58 
And which of the hundreds of freely available components did you try and why did they not meet your needs? You have to give us something to go on here. There's no reason in your question why I shouldn't sell you my million dollar chat box component, right? It's really shiny.
AnswerRe: Chat Box Componentmember ProgramFOX15 May '13 - 5:36 
Hi,
 
Have a look here:
Simple chat application for ASP.NET[^]
Simple Chat Application in ASP.NET[^]
Chat Application in ASP.NET Using AJAX (Pop-up Windows)[^]
Build a Web Chat Application using ASP.Net 3.5, LINQ and AJAX (in C# 3.5 or VB 9.0)[^]
Building an AJAX Based Web Chatting Application using ASP.NET 2.0[^]
ASP.NET Chatting using WCF Services and JSon[^]
Build a Web based Chat using ASP.NET Ajax[^]
 
You'll find more links here:
http://www.google.com/search?q=asp.net+chat+application[^]
The quick red ProgramFOX jumps right over the Lazy<Dog>.
 
My latest article: Understand how bitwise operators work (C# and VB.NET examples)
 
My group: C# Programmers Group

QuestionWebMatrix, SQL Compact and Windows AzurememberRanger4914 May '13 - 3:28 
I use WebMatrix 3. I've got an ASP.NET Web Pages site that draws fractals, it uses a SQL Compact database and works fine locally.

But after I published it to the Azure Cloud and tried it, I get an error in the Database.cshtml that it doesn't work. Error: Failed to find or load the registered .Net Framework Data Provider.

The URL is: http://aljo-fractals.azurewebsites.net Click on the option Database and you'll get to see the error.

I guess I need to add a framework to use the database, where do I get that?

This must be easy to fix, but how...
QuestionDatabase Errormember<<Tash18>>14 May '13 - 3:17 
Hi,
I have developed an ASP.net VB application on 1.1 in which we insert certain data into a particular table which is on sybase.
My table structure:
CREATE TABLE dbo.at_ip_disbursement
(
doc_id numeric(7,0) IDENTITY,
doc_type varchar(30) NOT NULL,
rim_no int NOT NULL,
item_type varchar(80) NULL,
customer_name varchar(80) NOT NULL,
rsm_name varchar(80) NOT NULL,
branch_no int NULL,
business_unit varchar(30) NOT NULL,
input_dt datetime NOT NULL,
Category varchar(30) NULL,
deferral_details nvarchar(600) NULL,
days_deferred int NULL,
Deff_Expdt datetime NOT NULL,
Deferred_Dt datetime NULL,
rm_comments nvarchar(600) NULL,
creator_id varchar(10) NULL,
modifier_id varchar(10) NULL,
status char(1) NOT NULL,
App_Authority nvarchar(600) NULL
)
LOCK ALLPAGES
go
IF OBJECT_ID('dbo.at_ip_disbursement') IS NOT NULL
PRINT '<<< CREATED TABLE dbo.at_ip_disbursement >>>'
ELSE
PRINT '<<< FAILED CREATING TABLE dbo.at_ip_disbursement >>>'
go
 
Now the piece of code where the insert takes place:
 
Public Shared Function AddDisbursement(ByVal DocType As String, ByVal Rim As Int32, ByVal CustomerName As String, ByVal RSMName As String, ByVal BranchNo As Int32, ByVal Business As String, ByVal InputDate As String, ByVal Category As String, ByVal DeferralDetails As String, ByVal DeferredDays As String, ByVal DefExpDate As String, ByVal DefDate As String, ByVal RMComments As String, ByVal CreatorId As String, ByVal App_Authority As String, ByVal Item As String) As String
        Dim logger As SKLogger = New SKLogger
        Dim connMosaic As String = System.Web.HttpContext.Current.Session("connStr").ToString()
        Dim cmdText As String
 
        cmdText = "INSERT INTO at_ip_disbursement(" & _
                    "doc_type, " & _
                    "rim_no, " & _
                    "customer_name, " & _
                    "rsm_name, " & _
                    "branch_no, " & _
                    "business_unit, " & _
                    "input_dt, " & _
                    "Category, " & _
                    "deferral_details, " & _
                    "days_deferred, " & _
                    "Deff_Expdt, " & _
                    "Deferred_Dt, " & _
                    "rm_comments, " & _
                    "creator_id, " & _
                    "status, " & _
                    "App_Authority, " & _
                    "item_type) " & _
                "VALUES (" & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "?," & _
                    "'A'," & _
                    "?," & _
                    "?)"
 
        Dim conn As OdbcConnection = New OdbcConnection(connMosaic)
        Dim cmd As OdbcCommand = New OdbcCommand(cmdText, conn)
 
        cmd.Parameters.Add("@DocType", OdbcType.VarChar).Value = DocType
        cmd.Parameters.Add("@Rim", OdbcType.Int).Value = Rim
        cmd.Parameters.Add("@CustomerName", OdbcType.VarChar).Value = CustomerName
        cmd.Parameters.Add("@RSMName", OdbcType.VarChar).Value = RSMName
        cmd.Parameters.Add("@BranchNo", OdbcType.Int).Value = BranchNo
        cmd.Parameters.Add("@Business", OdbcType.VarChar).Value = Business
        cmd.Parameters.Add("@InputDate", OdbcType.Date).Value = InputDate
        cmd.Parameters.Add("@Category", OdbcType.VarChar).Value = Category
        cmd.Parameters.Add("@DeferralDetails", OdbcType.VarChar).Value = GetNull(DeferralDetails)
        cmd.Parameters.Add("@DeferredDays", OdbcType.Int).Value = DeferredDays
        cmd.Parameters.Add("@DefExpDate", OdbcType.Date).Value = DefExpDate
        cmd.Parameters.Add("@DefDate", OdbcType.Date).Value = GetNull(DefDate)
        cmd.Parameters.Add("@RMComments", OdbcType.VarChar).Value = GetNull(RMComments)
        cmd.Parameters.Add("@CreatorId", OdbcType.VarChar).Value = GetNull(CreatorId)
        cmd.Parameters.Add("@App_Authority", OdbcType.VarChar, 1200).Value = GetNull(App_Authority)
        cmd.Parameters.Add("@Item", OdbcType.VarChar).Value = GetNull(Item)
 
        Try
            conn.Open()
            cmd.ExecuteNonQuery()
        Catch ex As Exception
            logger.LogException("AddDisbursement", ex.ToString())
            AddDisbursement = ex.Message
        Finally
            cmd.Dispose()
            conn.Close()
        End Try
 
        'Return True
    End Function
 
Now through javascript i allow user to input only 500 Characters(which works perfectly). Once the user submits data (say for example 400 characters) which is under the field "App_Authority" i get the following error:
 
ERROR [HY000] [INTERSOLV][ODBC SQL Server driver][SQL Server]ct_param(): user api layer: external error: A data length of 399 exceeds the maximum length allowed for CHAR data.
 
The same happens when i try to insert data into fields "RMComments" and "DeferralDetails"
 
Kindly advise me.
Thanks in Advance
AnswerRe: Database Errormemberjkirkerx14 May '13 - 7:57 
<<Tash18>> wrote:
cmd.Parameters.Add("@App_Authority", OdbcType.VarChar, 1200).Value = GetNull(App_Authority)

 
Above is varchar, but in the table, you made it nvarchar,
 
It's a mismatch, that involves unicode I think, in which one is double the space of the other,
varchar is a 8bit codepage
 
[edit]
 
adjust your column in the table to take 1200 or whatever the value is suppose to be or vice versus
App_Authority varchar(1200) NULL

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid