15,908,675 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by irfanniazi (Top 35 by date)
irfanniazi
22-Apr-14 6:57am
View
protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
SqlDataSource2.Insert();
}
this is the code and i dont know is this correct or not??
irfanniazi
10-Apr-14 4:03am
View
Execution of authentication request returned unexpected result: 407 i am getting this error while using the following code
protected void Button1_Click(object sender, EventArgs e)
{
DataSet ds = GetGmailContacts("MailContact", this.TextBox1.Text, this.TextBox2.Text);
this.GridView1.DataSource = ds;
this.GridView1.DataBind();
}
public static DataSet GetGmailContacts(string App_Name, string Uname, string UPassword)
{
DataSet ds = new DataSet();
DataTable dt = new DataTable();
DataColumn C2 = new DataColumn();
C2.DataType = Type.GetType("System.String");
C2.ColumnName = "EmailID";
dt.Columns.Add(C2);
RequestSettings rs = new RequestSettings(App_Name, Uname, UPassword);
rs.AutoPaging = true;
ContactsRequest cr = new ContactsRequest(rs);
Feed<contact> f = cr.GetContacts();
foreach (Contact t in f.Entries)
{
foreach (EMail email in t.Emails)
{
DataRow dr1 = dt.NewRow();
dr1["EmailID"] = email.Address.ToString();
dt.Rows.Add(dr1);
}
}
ds.Tables.Add(dt);
return ds;
}
irfanniazi
10-Apr-14 4:01am
View
Deleted
is there any need of configuration settings to perform this task??
irfanniazi
9-Apr-14 0:06am
View
how can i solve this error?
irfanniazi
29-Mar-14 8:19am
View
yes
irfanniazi
29-Mar-14 8:00am
View
i want to use smtp.host = "localhost" smtp.port = 25 and want that in mail."From" portion user should enter email id no matter it is gamil or yahoo ?
irfanniazi
29-Mar-14 7:53am
View
i tried this but i have to provide my gmail id and password then mail is sent from my gmail account but it makes gmail account necessary to all users bout what if somee one want to send mail from yahoo or any other domai??
irfanniazi
28-Mar-14 22:33pm
View
Content moved to question.
irfanniazi
3-Mar-14 10:00am
View
S is the text of label and it is M but still not enetring in this block
irfanniazi
3-Mar-14 9:10am
View
what is the benifit of using item Comand event here how it is different from my approach
??
irfanniazi
3-Mar-14 6:57am
View
i want that if answer type is "M" radiobuttonlist should be shown or if it is "C" checkboxlist should appear!!
irfanniazi
24-Feb-14 9:39am
View
i tried this thing
cmd2.Parameters.AddWithValue("@ctext",TextBox6.Text);
cmd2.Parameters.AddWithValue("@ctext", TextBox7.Text);
cmd2.Parameters.AddWithValue("@ctext", TextBox8.Text);
cmd2.Parameters.AddWithValue("@ctext", TextBox9.Text);
but gets the following error
The variable name '@ctext' has already been declared. Variable names must be unique within a query batch or stored procedure
i had tried this before posting the Question and now again geting same error .
irfanniazi
24-Feb-14 9:27am
View
cmd2 = new SqlCommand("Insert into Choices(Choicetext,Questionid) Values (@ctext,@qid)");
cmd2.Parameters.AddWithValue("@ctext",TextBox6.Text);
cmd2.Parameters.AddWithValue("@qid",qid);
i am doing with above code. actually i do not know how to get text of each textbox as in above case you see that only one option will be saved i.e text of TextBox6 and what about remaining four textboxes??
irfanniazi
24-Feb-14 8:23am
View
thnks for guiding me but i have a seprate table options(optionid,optiontext,Questionid) how i can insert in this table
irfanniazi
20-Feb-14 2:45am
View
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
<itemtemplate>
<asp:Label ID="QuestiontextLabel" runat="server"
Text='<%# Eval("Questiontext") %>' />
<br />
<asp:Label ID="Label1" runat="server"
Text='<%# Eval("QuestionID") %>' Visible="false" />
<br />
<asp:Label ID="Label3" runat="server"
Text='<%# Eval("Answertype") %>' />
<br />
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
DataSourceID="SqlDataSource1" DataTextField="Choicetext"
DataValueField="Choicetext">
this is my datalist
irfanniazi
28-Jan-14 2:11am
View
i have one table Survey(Surveyid,title,Description) and Second is Question(Questionid,Text,Surveyid)i want than when i add detail of survey and question both should be entered . i successfully inserts the first record get the value using Socpe Identity but while inserting in second i get error
.
irfanniazi
28-Jan-14 2:09am
View
i get Error Input string was not in a correct format.
irfanniazi
13-Nov-13 9:14am
View
Thanks a lot
!!
irfanniazi
9-Oct-13 10:14am
View
thanks to all friends plz answer another question of mine that as in www.fluidsurvey.com and in google form we can select answer type of our choice and textboxes , radio buttons etc.appears dynamicly according to answer type selected so can this thing can be done using asp.net and javascript???
irfanniazi
25-Jul-13 2:43am
View
the prblm i m getting is this that when i select survey all question are shown at one place i want to show one question then its options and then second questions... not getting the required format??
irfanniazi
25-Jul-13 2:25am
View
i have currently used sql data source .. and data grid to show questions and options but it is not working the way i want . kindly share a tutorial plz..
irfanniazi
5-Jul-13 0:12am
View
i want to make some controls visible and other invisible depending on the checkbox being selected.kindly can you share some tutorial in which shows how to make some portion of a form visible on the basis of which checkbox is selected.
irfanniazi
6-May-13 0:26am
View
i want to get four edge points(x,y) axis of corner of one image and then want to translate the sacnned image in a way that edge points of second image become same as of first one so that second image becomes same as first one.
irfanniazi
5-May-13 12:58pm
View
i have two image first is original and second one is scanned copy of first the scanned copy gets rotated and enlarged after scann so i want transformation of second image to become same as first(original) img.
irfanniazi
23-Apr-13 2:34am
View
so i should have pictureBox1.Image!=null before that line??
irfanniazi
19-Apr-13 7:05am
View
i have tried and my code is given below
private void button1_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(open.FileName);
myBitmap = new Bitmap(pictureBox1.Image);
}
}
catch (Exception)
{
throw new ApplicationException("Failed loading");
}
}
private void button2_Click(object sender, EventArgs e)
{
while (pictureBox1.Image != null)
{
pictureBox1.Image = ResizeBitmap(myBitmap, 333, 444);
}
}
public static Bitmap ResizeBitmap(Bitmap sourceBMP, int width, int height)
{
Bitmap result = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(result))
g.DrawImage(sourceBMP, 0, 0, width, height);
return result;
}
private void button3_Click(object sender, EventArgs e)
{
if (pictureBox1.Image != null)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp";
saveFileDialog.FilterIndex = 1;
saveFileDialog.RestoreDirectory = true;
if (DialogResult.OK == saveFileDialog.ShowDialog())
{
pictureBox1.Image.Save(saveFileDialog.FileName);
}
}
else
MessageBox.Show("No images are currently open.", "Alert");
}
}
but i am geeting "outof memory exception" at line : using (Graphics g = Graphics.FromImage(result))
g.DrawImage(sourceBMP, 0, 0, width, height);
plese help me to avoid this exception???
irfanniazi
18-Apr-13 11:27am
View
i have drawn circles on image using graphics.drawellipse() method and after saving image i have printed and scanned it but the scanned image is elarged so i want it to be of original dimensions.....
irfanniazi
12-Apr-13 3:50am
View
can you share a complete code please!!!!!!!!!!
irfanniazi
12-Apr-13 3:37am
View
gr.DrawImage(img, new Rectangle(0, 0, width, height));
herw "img" is which image. mean either it is new one or refernce of the image on which it is to be drawn
irfanniazi
8-Apr-13 7:35am
View
yup that is what i want to do but how to get average of colors in c#??
irfanniazi
8-Apr-13 7:22am
View
so far i have designed an answer sheet like the one used for filling mcqs answers. i have drawn circles using Drawellipse() method. and i have stored the points which are residing iside the circles now i want to get color of all these pixels and then to get average color of all these points.
cl[0] = myBitmap.GetPixel(array_X[0], array_Y[21]);
cl[1] = myBitmap.GetPixel(array_X[1], array_Y[22]);
cl[2] = myBitmap.GetPixel(array_X[2], array_Y[23]);
cl[3] = myBitmap.GetPixel(array_X[3], array_Y[24]);
now i eant to get average color of these points i.e cl[x] = Average(cl[0],cl[1],cl[3])
irfanniazi
8-Apr-13 7:03am
View
is it neccesrry to convert image into grayscale???
irfanniazi
8-Apr-13 6:53am
View
as we do average like avg(45,35,40) then avg will be 40 in the same way i want to know average of colors how to do this in c#??
irfanniazi
8-Apr-13 6:52am
View
Dear i am OK with GETpIXEL.it is an winform actually now i want to get the color which is more occuring in these pixels i.e if a circle contains 10 points out of which 7 are white and 3 are black then i want a method which should take these points clor and result should be that color is white as majority points are of white color???
irfanniazi
25-Feb-13 10:13am
View
yes but i am not having any idea about how to get position of circles inside image with respect to x y coordinates!!!!!!
Show More