15,906,329 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 Sharmanuj (Top 55 by date)
Sharmanuj
4-Dec-14 4:14am
View
Hi Ali,
If you have n no of columns in your excel file and want to capture all the columns data in the json file then, your column name would be the key for the dictonary object. And the rows data would be in the list object.
for example if you have 10 rows and 5 columns then list object would contain 10 rows data related to first column and that would get added in dictonary. Similarly for all the columns.
Regards,
Sharmanuj
Sharmanuj
21-Aug-14 3:04am
View
What is your basic requirement to achieve by making clone windows?
Sharmanuj
21-Aug-14 2:59am
View
you can apply the css to any level of the child. Clear me one thing, are you having page design at runtime or statically design.
Sharmanuj
20-Aug-14 8:20am
View
You should use the following query.
string qry = "select * from tbmobile where uid='" + comboBox2.SelectedValue.ToString() + "'";
ComboBox.SelectedValue should be converted into String.
Sharmanuj
13-Aug-14 1:28am
View
in above comment you told you want to register all details in database. What is the exact requirement buddy
Sharmanuj
12-Aug-14 8:50am
View
See the steps in the answer to achieve this.
Sharmanuj
12-Aug-14 8:42am
View
To show the selected value in the comboBox control from the data base use this
cbCountryCode.SelectedValue = dataTable.Rows(0).Item(2).ToString()
Sharmanuj
12-Aug-14 8:37am
View
Give some more details what you want to achieve.
Sharmanuj
12-Aug-14 8:25am
View
Check these URLs. May these help you.
http://www.codeproject.com/Articles/86631/Search-Engine-Optimization-SEO-Enhancement-in-ASP
http://devproconnections.com/aspnet-mvc/simple-technique-improving-seo-aspnet-mvc
http://msdn.microsoft.com/en-us/magazine/ee405899.aspx
Sharmanuj
12-Aug-14 8:14am
View
you have this requirement for ASP.Net application or winForms application.
Sharmanuj
12-Aug-14 8:11am
View
Is the webservice returning Json data or Xml format data?
Sharmanuj
12-Aug-14 8:07am
View
could you elaborate a bit more on this question
Sharmanuj
1-Aug-14 4:22am
View
See that is based on the application format. I gave you the example for WPF application in which ComboBox class is under namespace "System.Windows.Controls".
The same ComboBox class exists in Winfroms under namespace "System.Windows.Forms".
I hope this is clear to you.
Sharmanuj
1-Aug-14 3:30am
View
kindly explain you question
Sharmanuj
1-Aug-14 3:07am
View
Pass the Datatable to bind the value. you are passing DataAdapter object in method.
Sharmanuj
1-Aug-14 3:05am
View
add a new parameter in the method as fieldName and pass the value as provided below.
BC.BindComboBoxDataContext(cmbSession, dt, dt.Columns[0].ToString());
Sharmanuj
1-Aug-14 3:05am
View
Deleted
add a new parameter in the method as fieldName and pass the value as provided below.
BC.BindComboBoxDataContext(cmbSession, dt, dt.Columns[0].ToString());
Sharmanuj
1-Aug-14 0:36am
View
can you access some folder of other machine from your machine. If not then check the firewall settings for both the machine.
If folder is accessible then check with the Url which you are trying to access.
Sharmanuj
1-Aug-14 0:34am
View
Could you post your code here in which you are getting error
Sharmanuj
31-Jul-14 8:17am
View
Which version of .Net framework are you using?
Sharmanuj
31-Jul-14 8:04am
View
For ComboBox controls we have 2 basic values
a. Id and b. Text
In the same manner DisplayMemberPath is the Text Value and SelectedValueMemberPath would be ID.
you can pass same values in both the parameters if required. but the best practice is to bind with ID and Text.
Sharmanuj
31-Jul-14 7:23am
View
Right click on the ComboBox and resolve it. That will include the namespace in your current class.
Sharmanuj
31-Jul-14 6:47am
View
Try This code
using System;
using System.Collections.Generic;
using System.Text;
namespace MINE.classes
{
class bc_session
{
public void BindComboBoxDataContext(ComboBox comboBox, DataTable dtDataContext, string displayMemberPath, string selectedValueMemberPath)
{
try
{
comboBox.DataContext = dtDataContext;
comboBox.DisplayMemberPath = displayMemberPath;
comboBox.SelectedValuePath = selectedValueMemberPath;
comboBox.SelectedIndex = -1;
}
catch (Exception ex)
{ }
}
}
}
Sharmanuj
31-Jul-14 6:46am
View
you have to include the required namespaces as well on the class which you'll prepare.
Sharmanuj
31-Jul-14 6:44am
View
This is the method provided which you have to embed into a class. Then use on your forms.
Sharmanuj
31-Jul-14 5:21am
View
Check with firewall settings. if those are on, Off the firewall features
Sharmanuj
31-Jul-14 4:58am
View
you should try this
DateTime currentDateTime;
currentDateTime = Convert.ToDateTime(dbr["RealnyCzas"].ToString());
dateTimePicker5.Value = currentDateTime ;
Sharmanuj
31-Jul-14 4:49am
View
Yes
Sharmanuj
31-Jul-14 4:38am
View
What is the error/issue you are getting?
Sharmanuj
31-Jul-14 4:37am
View
See the upper comments to open the inetmgr
Sharmanuj
31-Jul-14 4:34am
View
In the command prompt type the command "ipconfig". That will give your machine IP address.
Machine name can be find from MyComputer property
Sharmanuj
31-Jul-14 4:18am
View
Here you have to make changes. That is the example url i've given, you have to fill the right attributes in that.
While accessing the final url change "localhost" with Machine name or Ip address of your app hosted machine.
I guess you've got what to do.
Sharmanuj
31-Jul-14 3:33am
View
Yes, you can also browse the application by giving the proper path of the page in web browser.
like
Http://localhost/VirtualDirName/Default.aspx
later on you can change localhost with machine name and VirtualDirName by your application name given in Inetmgr.
Sharmanuj
31-Jul-14 3:16am
View
you've to open the path
cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 then press enter
Sharmanuj
31-Jul-14 3:10am
View
Start->Microsoft Visual Studio 2012->Visual Studio tools->VS2012 x64 Cross tools command prompt.
Sharmanuj
31-Jul-14 2:56am
View
to register the framework 4.0 version follow these steps first.
1. Run visual studio command prompt with "Run as Administrator" option.
2. Open this path if you are using 64bit OS.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
3. copy this path and paste into command prompt.
4. run this command "aspnet_regiis -i" and press enter.
5. once done then reset iis with "IISreset" command.
6. Go to IIS server with Inetmgr and change the app pool.
Regards
Anuj Sharma
Sharmanuj
31-Jul-14 0:29am
View
Follow these steps
1. Open Inetmgr
2. On Left panel, right click on "Default web sites" under the sites.
3. Choose Add application option and a new window will open
4. Give alias name for your application e.g "MyApp"
5. Provide the physical path of the web site content
6. Choose the application pool according to your .Net framework.
7. After filling all information click on OK. And then browse your application.
Regards
Anuj Sharma
Sharmanuj
30-Jul-14 5:06am
View
1. Open IIS server from your machine by command "inetmgr" in run window.
2. Make a virtual directory/Application in IIS server. Name it like "MyAppTest".
3. Specify the physical path of the web site content for this virtual directory/Application.
4. Set the desired application pool to this application. If your website is developed in .Net framework 4 then set Application pool 4.0 framework.
5. Browse the application from web browser.
for example :
http://MachineIP/MyAppTest/Page1.aspx
Sharmanuj
30-Jul-14 2:48am
View
give some more information regarding the desired output
Sharmanuj
25-Jul-14 1:30am
View
Hi Bhushan,
what you can do on this code, rather than working for single input/output, you can pass an array or collections of input values and loop it through for input range. get the output in same length of array or collection.
This would lead an upper loop and internal loop you can take as given.
"foreach"
loop.
Regards
Sharmanuj
Sharmanuj
24-Jul-14 3:00am
View
Hi Sadhna,
please see the below solution provided.
Sharmanuj
23-Jul-14 2:21am
View
Hi Sujay,
could you provide some more information regarding what you want to achieve.
Sharmanuj
22-Jul-14 4:37am
View
Kindly provide the table design for this page as well. i guess you should use <td> tag before the Panel and close it after Panel.
See the updated code below.
Sharmanuj
22-Jul-14 4:29am
View
use the below code
cmdUpdate = "UPDATE db1 " + "SET Names = '" + textname.Text + ",'Number = '" + textmarks.Text + "' WHERE ID = " + lbl.Text;
Sharmanuj
22-Jul-14 2:56am
View
Hi,
Kindly mark answer if working.
Sharmanuj
22-Jul-14 2:37am
View
Hi
Set the CommandType Property for command object before adding the parameters
command.CommandType = CommandType.StoredProcedure;
Sharmanuj
18-Jul-14 9:48am
View
Hi Dipika,
could you please share your code, so that i can look into this. \
Regards,
Anuj Sharma
Sharmanuj
18-Jul-14 9:32am
View
Deleted
Hi Dipika,
because it was not able to find index for column. use columnName in place of Index
foreach(DataColumn dc in dtGZData.Columns)
{
x[index] = Convert.ToDouble(rowX[dc.ColumnName].ToString());
y[index] = Convert.ToDouble(rowY[dc.ColumnName].ToString());
}
Sharmanuj
18-Jul-14 9:29am
View
Hi Dipika,
rowX and rowY would be type of DataRow
i.e
DataRow rowX = dtGZData.Rows[0];
DataRow rowY = dtGZData.Rows[1];
Sharmanuj
18-Jul-14 6:11am
View
Hi Deepika,
here is the updated code. instead of row[0] kindly use rowX which holds 1st row object from datatable.
int totalColumns = dtGZData.Columns.Count;
rowX = dtGZData.Rows[0];
rowY = dtGZData.Rows[1];
double[] x = new double[totalColumns];
double[] y = new double[totalColumns];
for(int index=0; index
Sharmanuj
18-Jul-14 1:37am
View
Hi Rahul,
thanks for marking the solution.
Regards
Anuj Sharma
Sharmanuj
18-Jul-14 1:32am
View
Hi Venga,
this would come in the different cell as required. I did some modification in code. use the html table control to create rows and cells.
Kindly see the below code
Protected Sub GenerateXls(ByVal fileName As String, ByVal dtData As DataTable)
Try
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ContentType = "application/ms-excel"
HttpContext.Current.Response.AddHeader("Content-Disposition", "inline; filename=" + fileName + "")
HttpContext.Current.Response.Flush()
Dim colCount, rowCount As Integer
HttpContext.Current.Response.Write("<Table>")
HttpContext.Current.Response.Write("<TR>")
For colCount = 0 To dtData.Columns.Count - 1
HttpContext.Current.Response.Write("<TD>")
HttpContext.Current.Response.Write(dtData.Columns(colCount).ColumnName.ToString())
'HttpContext.Current.Response.Write("\t")
HttpContext.Current.Response.Write("</TD>")
Next
HttpContext.Current.Response.Write("</TR>")
For rowCount = 0 To dtData.Rows.Count - 1
'HttpContext.Current.Response.Write("\n")
HttpContext.Current.Response.Write("<TR>")
For colCount = 0 To dtData.Columns.Count - 1
HttpContext.Current.Response.Write("<TD>")
HttpContext.Current.Response.Write(dtData.Rows(rowCount)(colCount).ToString())
'HttpContext.Current.Response.Write("\t")
HttpContext.Current.Response.Write("</TD>")
Next
HttpContext.Current.Response.Write("</TR>")
Next
HttpContext.Current.Response.Write("</Table>")
HttpContext.Current.Response.End()
Catch ex As Exception
End Try
End Sub
Sharmanuj
17-Jul-14 6:41am
View
Hi Venga,
I could see there is a line mistake in the for loop. kindly use the below updated code and that will work to get all the data in separate columns
Public Sub SaveExcelFile(ByVal fileName As String, ByVal dtData As DataTable)
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ContentType = "application/ms-excel"
HttpContext.Current.Response.AddHeader("Content-Disposition", "inline; filename=" + fileName + "")
HttpContext.Current.Response.Flush()
Dim colCount, rowCount As Integer
For colCount = 0 To dtData.Columns.Count - 1
HttpContext.Current.Response.Write(dtData.Columns(colCount).ColumnName.ToString())
HttpContext.Current.Response.Write("\t")
Next
For rowCount = 0 To dtData.Rows.Count - 1
HttpContext.Current.Response.Write("\n")
For colCount = 0 To dtData.Columns.Count - 1
HttpContext.Current.Response.Write(dtData.Rows(rowCount)(colCount).ToString())
HttpContext.Current.Response.Write("\t")
Next
Next
HttpContext.Current.Response.End()
End Sub
Sharmanuj
17-Jul-14 1:12am
View
Hi Venga,
As you want to achieve this in VB.net and the solution is in C#.Net. could you please share your piece of vb.net code so that i can check the same.
Regards,
Anuj Sharma
Sharmanuj
17-Jul-14 1:10am
View
Hi Venga,
The data will be palced in different rows and columns according to your data table values,
to separate data in column we use
HttpContext.Current.Response.Write("\t");
and to put data in next row
HttpContext.Current.Response.Write("\n");
could you please share your data result so that i can check in that.
Regards
Anuj Sharma
Show More