15,896,726 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 Yatin Bhagat (Top 27 by date)
Yatin Bhagat
10-Nov-11 4:23am
View
Dim url As String = Me.txtUrl.Text.Trim()
Dim port As String = Me.txtPort.Text.Trim()
'If the port was provided, then insert it into the url.
If port <> "" Then
'Insert the port into the Url
'https://www.example.com:80/fileToDownload.dat
Dim u As New Uri(url)
'Get the host (example: www.example.com)
Dim host As String = u.Host
'Replace the host with the host:port
url = url.Replace(host, host & ":" & port)
End If
'Create the request
Dim request As HttpWebRequest = _
DirectCast(System.Net.HttpWebRequest.Create(url), HttpWebRequest)
'Set the User Name and Password
request.Credentials = New NetworkCredential(Me.txtUserName.Text.Trim(), Me.txtPassword.Text.Trim())
request.Method = WebRequestMethods.Http.Get
Dim response As HttpWebResponse = Nothing
Try
'Get the response
response = DirectCast(request.GetResponse(), HttpWebResponse)
Catch ex As Exception
MessageBox.Show("An error occurred while attempting to retrieve data from the remote server. " & _
"The following error occurred while attempting to retrieve the data:" & vbCrLf & vbCrLf & _
ex.Message)
End Try
this is my code and it will show messeage 'Remote Server Not responding'
Yatin Bhagat
14-Sep-11 6:07am
View
i have created a seperate class for database operations only
Yatin Bhagat
1-Jul-11 6:04am
View
Deleted
it will not sort dates by dt.DefaultView.Sort
Yatin Bhagat
7-May-11 1:20am
View
actully i am not reffring any web site,i have designed my own html file and placed it in root directory,in this what should be the steps???
Yatin Bhagat
21-Apr-11 8:54am
View
like it!!!!!
my clients use a dos based software developed in foxpro and they the flow is very fast on arrow keys and enter key...and they got habbited of using that way....so place such kind of requirments
Yatin Bhagat
19-Apr-11 6:39am
View
but what if it is a Specific Requirement of Client??????
Yatin Bhagat
18-Apr-11 13:56pm
View
yes exactly...i am asking about Up and Down Keys...But I got hint from this ...Thank you
Yatin Bhagat
10-Mar-11 0:13am
View
its helpful thank you so much
Yatin Bhagat
4-Mar-11 7:19am
View
I sort Out The error...But When Using ShowDialog the contents of MainMenu are enabled i am trying to disable the contents and after valid login content should be enabled.
Yatin Bhagat
4-Mar-11 1:06am
View
i am using showdialog...but it is raising some error
Yatin Bhagat
17-Jan-11 7:48am
View
My client uses a Dos based software ..which is much easy to navigate with out mouse....and client have a habbit of using enter keys or arrow keys..thats why for my dot net application very first requirment is Software with less use of Mouse...and I have to do this....i know very well tab or Shift+tab is available or i can arrange some Combination key navigation like Cntrol+ A etc....But i need to do this with Enter Keys and Arrow keys.
Yatin Bhagat
7-Jan-11 5:13am
View
This code give Connection error
Yatin Bhagat
31-Dec-10 2:34am
View
yes exactly...but is masking possible with Datetimepicker???
Yatin Bhagat
20-Dec-10 6:54am
View
Deleted
It doesn't give any response...the panel is not Poping up
Yatin Bhagat
8-Dec-10 0:36am
View
Thank you....
Yatin Bhagat
1-Dec-10 0:07am
View
public void readFile(string path)
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.ConformanceLevel = ConformanceLevel.Fragment;
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true;
XmlReader reader = XmlReader.Create(path, settings);
string Rxml = "";
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element: // The node is an element.
Rxml = reader.Name;
break;
case XmlNodeType.Text: //Display the text in each element.
if (Rxml == "VoucherNo")
{
VoucherNo = Convert.ToInt32(reader.Value);
break;
}
else if (Rxml == "VoucherType")
{
VoucherType = reader.Value;
break;
}
else if (Rxml == "VoucherDate")
{
dtpBillDate.Value =Convert.ToDateTime(reader.Value);
break;
}
}
reader.Close();
}
This is my ReadFile() code
Yatin Bhagat
30-Nov-10 23:45pm
View
and even i am not getting Dispose() method for reader
Yatin Bhagat
30-Nov-10 6:58am
View
i am creating xml file and stored it in debug folder...and after that from this location i am trying to read the file.read operation executes without any error but after that i am trying to delete this file and here comes the error
Yatin Bhagat
30-Nov-10 6:54am
View
Deleted
in debug folder of application where .exe file is located
Yatin Bhagat
30-Nov-10 6:48am
View
how to set the file permissions in c#.net....my file is stored in application root directory
Yatin Bhagat
24-Nov-10 6:12am
View
in SelectedIndexChanged it will not getting the control cb
Yatin Bhagat
18-Nov-10 4:28am
View
Deleted
my code is like bellow
string path = Application.StartupPath + "\\PurchaseBill.xml";
writer = writer = XmlWriter.Create(path);
writer.WriteStartElement("Bill");
writer.WriteElementString("VoucherNo", dtHeaderInfo.Rows[0][0].ToString());
writer.WriteElementString("VoucherType", dtHeaderInfo.Rows[0][1].ToString());
writer.WriteElementString("VoucherDate", dtHeaderInfo.Rows[0][2].ToString());
writer.WriteElementString("PartyId", dtHeaderInfo.Rows[0][3].ToString());
writer.WriteElementString("BillNo", dtHeaderInfo.Rows[0][4].ToString());
writer.WriteElementString("BillDate", dtHeaderInfo.Rows[0][5].ToString());
writer.WriteEndElement();
write.Flush();
if (File.Exists(path))
File.Delete(path);/Or Close Purchase.xml
Yatin Bhagat
29-Jul-10 4:46am
View
1. Create A new Windows Project of C#.net
2.Set Key Preview Property Of Form to true.
3.take a text Box on Form
4.Write A Key Press Event For the Form
5.Set Debug point on Key press Event
6.Now run Project,After Opening Form Press Any Key On Text Box
7.Now Check Out Sender Of Key Press Event At Debug Point..The Sender Is Form
Actually The Key is Pressed On Text Box...How to Get Sender As Text Box on key
press??????
Yatin Bhagat
8-Jul-10 5:19am
View
There is application.exit() method...
Yatin Bhagat
3-Jun-10 5:11am
View
i have a combobox containing product id,what i am trying is when i select product id from the combobox i want to display that product details in the grid view.
Yatin Bhagat
14-May-10 1:05am
View
by keypress event i can navigate between feilds easily, but i have to handle keypress of each control on the form and for this i have to write some line of code Repeatedly. So to avoid this i am looking for if is there any settings or property to set 'ENTER' key for navigation like TAB key
Yatin Bhagat
14-May-10 1:00am
View
hey thanks its working.
Show More