15,998,392 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 .NET 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 christhuxavier (Top 54 by date)
christhuxavier
12-Mar-15 7:09am
View
Thank you!,
there is no issue in giving path. we have to give read/write permission in IIS users after hosting.
christhuxavier
19-Dec-14 7:41am
View
I know and tested that default is 4096KB (4MB). also increased the size upto 2GB in web.config. But my question is that is there way to upload more than 2GB video from .net to sql server?
christhuxavier
14-Oct-14 8:45am
View
yes. i used JavaScript function which returns longitude and latitude. when i test in google map with those longitude and latitude, it shows wrong place.
if you look at android, just they use "LocationManager" class. they did not pass any address or pincode. But it returns longitude and latitude after they create object for location manager. likewise MSDN has System.Device.Location namespace. But i do not know to get longitude and latitude of my device located.
christhuxavier
14-Oct-14 6:46am
View
okay. the one you put url that belongs to windows.
i am developing project using asp.net web app. how to get latitude and longitude of location
christhuxavier
14-Aug-14 0:21am
View
hi Sergey!.. thanks a lot again. i got the performance through your suggestion.
christhuxavier
14-Aug-14 0:20am
View
i passed something like this. it works now.
$.ajax({
type: "POST",
url: "../WebService5.asmx/getseonval",
data: JSON.stringify(theValue),
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (data) {
OnSuccess(data.d);
},
error: function (xhr, status, error) {
OnFailure(error);
}
christhuxavier
14-Aug-14 0:17am
View
Deleted
i passed something like this. it works now.
$.ajax({
type: "POST",
url: "../WebService5.asmx/getseonval",
data: JSON.stringify(theValue),
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (data) {
OnSuccess(data.d);
},
error: function (xhr, status, error) {
OnFailure(error);
}
christhuxavier
14-Aug-14 0:14am
View
thanks pradeep. your code worked for me.
christhuxavier
30-Jul-14 3:00am
View
Thanks a lot.. i will check
christhuxavier
22-Jul-14 23:38pm
View
Thanks Mr.Kumarbs it works now..
christhuxavier
18-Jul-14 4:48am
View
like this
if @view="xxx" then i need to show heading1 else need to show heading2
christhuxavier
28-Jun-14 0:09am
View
i understood by your explaining params is not a optional paramter. i asked what else way to give optional paramter in web method..
christhuxavier
27-Jun-14 12:48pm
View
I am sorry.. but if you use params keyworkd in noraml application. it did not show any error see below,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
class Program
{
public int test(int i,params string [] s)
{
return i;
}
}
class t : Program
{
static void Main(string[] args)
{
t obj = new t();
int li = obj.test(4);
Console.WriteLine();
Console.ReadLine();
}
}
}
can you help me how it works? and i want to use optinal parameter in my .net xml webservice method. how to use optional paramter. kindly suggest me
christhuxavier
26-Jun-14 4:49am
View
I tried like this too
his.Master.Bind_Master_ProductsGrid();
It calls master's funtion and also has records in Gridview1.DataSource but Gridview1.DataBind() is not binding i guess as still i am getting nothing in gridview
christhuxavier
26-Jun-14 3:17am
View
Yes You are correct. But i am calling master's function from inside the button click envnt of child page not page load event handler.
for ex:
product.aspx:
consider update_cart_click button click event.
protected void update_cart_click(object sender , EventArgs e)
{
..//binding gridview cart and inserted into data base which is in child page.
when you click update_cart_click compiler will call page load then will go to master page then will go update_cart_click event.
Now i need to update same thing to master page function from here i need to call master page function. Normally from here will not go master page right?
how to do that?
That is why i added this to access master page function in product.aspx
<%@ MasterType VirtualPath="~/Site.master" %>
then i called inside the click event like below.
Site myMasterPage = Page.Master as Site;
myMasterpage.Bind_Master_ProductsGrid();
ya now that function calls successfully and i have the records Gridview1.DataSource = dt; but Gridview1.DataBind() is not binding so girdview shows empty.
}
christhuxavier
25-Jun-14 13:07pm
View
okay pls take a look
christhuxavier
16-Jun-14 13:43pm
View
You are right. I will try myself.
christhuxavier
20-Mar-14 8:26am
View
hi Naz, your code worked for me thanks a lot.
byte[] imgData = (byte[])reader["icon"];
File.WriteAllBytes("your apps local folder path", buffer);
but small correction i made in your coding. i used imgData instead of buffer ..
christhuxavier
19-Mar-14 9:33am
View
hello Ajith.. ofcourse to add folder . we have to right click in solution explorer. can you read my question clearly.. the question is how to save image once writted from byte.
christhuxavier
19-Mar-14 7:06am
View
Hi Syed, as you said. i worked on that. now it binds for child node only. but the issues the image shows only for child node. parent node is showing empty image.
christhuxavier
19-Mar-14 5:55am
View
hi. i used for each only.. i posted full coding. you can see what is the problem
private void bindingroodrecord()
{
sql = "EXEC [sp_parent_record]"; //stored procedur to get parent records
SqlCommand cmd = new SqlCommand(sql, objConn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt1 = new DataTable();
da.Fill(dt1);
Session["parentnode"] = dt1;
PopulateNodes(dt1, TreeView1.Nodes); ///////// for parent node
}
private void PopulateNodes(DataTable dt, TreeNodeCollection nodes)
{
foreach (DataRow dr in dt.Rows)
{
TreeNode tn = new TreeNode();
tn.Text = dr["columnfield"].ToString().Trim();
tn.Value = dr["code_webcategory_id"].ToString().Trim();
tn.ImageUrl = string.Format("image.aspx?category={0}&width=50", tn.Value);
nodes.Add(tn);
tn.PopulateOnDemand = (Convert.ToInt32(dr["childnodecount"]) > 0);
}
}
The above coding works fine.
NOTE: image.aspx, image comes from database(which comes as byte) and then writting as image using System.Drawing.Image bitmap = System.Drawing.Image.FromStream(stream),......the image comes from database and binds in tn.imageurl correctly.
so, right now as i have 100 records it binds image 100 time which is ok.
now the below coding to bind child notes
protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
PopulateSubLevel(Convert.ToInt32(e.Node.Value), e.Node); // i am getting parent node when user click (populate)on treeview to form a child node for parent node.
}
private void PopulateSubLevel(int parentid, TreeNode parentNode)
{
SqlCommand cmd = new SqlCommand("sp_getchildrecords", objConn);/// this is the stored procedure to get child node using parent id.
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@parentID", SqlDbType.Int).Value = parentid;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
Session["childnode"] = dt;
Session["childnodess"] = parentNode;
TreeNode childrecords = (TreeNode)Session["childnodess"];
PopulateNodes(dt, childrecords.ChildNodes); // to form child nodes
}
this also works fine. but,
Now, consider the child node has 10 records. once the populateNodes function gets over , it calls image.aspx to get an image. Now it binds 110 time again instead of binding 10 times.
christhuxavier
23-Jan-14 5:26am
View
thanks for reply. i made the mistake. I fixed that one. if we do not declare AllowPaging="true", it will not work. so, for gridview,listview , we have to declare paging stuff whenever we are accessing id of gridview and listview in Javscript.
christhuxavier
17-Jan-14 2:03am
View
Hi thank you. which option is good?
the first option i understood. i will try.
what is the second option. how to do that? can you give an example?
christhuxavier
27-Dec-13 6:16am
View
Okay Thanks a lot for good clarification Mr. RyanDev.
christhuxavier
26-Dec-13 8:11am
View
Thank you Mr.RyanDev, but few of them suggested me that you can generate own self-signed certificate if i have own IIS(web hosting provider). i have own web hosting provider.
christhuxavier
24-Dec-13 3:38am
View
hi JoCodes, i have used ajax frameworks using update panels only..let me try with your other suggession. Thanks a lot.
christhuxavier
23-Dec-13 23:54pm
View
okay.
christhuxavier
6-Dec-13 11:22am
View
hi Richard, Sampath,
I am sorry for not clear..i mean my javascript function is not invoking when i click on click button"see price in cart"
christhuxavier
5-Dec-13 3:37am
View
okay thank you for suggesting me.
christhuxavier
5-Dec-13 2:33am
View
Hi phil . Thank you. i got solution by you.
christhuxavier
23-Nov-13 0:07am
View
hi Karthik, Thanks a lot. Excellent..your coding works for me. i rated 5 for you. Thank you so much.
christhuxavier
22-Nov-13 23:36pm
View
Thank you. i understood what you example story imparts. i am not binding two tables from database. i can take row number from database using this query below:
SELECT ROW_NUMBER() OVER (ORDER BY ColumnA DESC) AS RowNo,
ColumnA,
ColumnB,
ColumnC
FROM YourTable
but, when you do first iteration. it comes correctly. the first time result would be like,
rowno name
1 chris
2 Ram
when it finishes second iteration , the result will be below as i am merging into one table:
rowno name
1 chris
2 Ram
1 avanash //see again it starts from 1. it is supposed to start 3.
2 karthick.
few people suggest use key for two table. that is not possible. becuase for example i mentioned two table. like that i am merging morethan 10 table' records in one datatable. that is why i made that Rowno is not coming from database. because i need to build rowno from front end like adding column as rowno.
christhuxavier
22-Nov-13 7:28am
View
Thanks a lot Dineshshp!.
christhuxavier
22-Nov-13 5:09am
View
can you give example?
christhuxavier
22-Nov-13 5:09am
View
can you give example.
christhuxavier
22-Nov-13 5:08am
View
hi thatraja,Rohan Leuva and King_fisher,
yes i am taking row number from the database and i did not show anywhere. i am showing records in datalist over the site. for paging concept i need row number. in datalist, there is no option for paging. we have to make paging using row number. That is why i need row number for paging.
christhuxavier
20-Nov-13 7:26am
View
okay i will try.
christhuxavier
9-Nov-13 8:07am
View
Thank you. i saw you link. that was paging concept. but my requirement is different. kindly read my question again. please give any example.
christhuxavier
9-Nov-13 8:01am
View
Hi prabakar, i did not see that link which was my mistake. i can try now. i like your quotes - no pain no gain.
christhuxavier
9-Nov-13 7:50am
View
hi prabakar, Can you give example please
christhuxavier
7-Nov-13 11:31am
View
Thank you
christhuxavier
7-Nov-13 6:53am
View
Yes you are correct. that is what i need.
christhuxavier
7-Nov-13 6:20am
View
hi i have brand for tools for example consider bosch is a brand. so, this bosch contains many categories so, bosch is 'B' serial in alphabetical right? like that there are several brand which some start with A or B or C or D .......or Z serial. so, now i want to seperate A-B brand, C-D brand......Y-Z brand so that user choose which they need. how to do in asp.net c#. i think we have to use datalist concept. please guide me in correct way.
christhuxavier
16-Oct-13 12:16pm
View
I got it. Thanks a lot!.
christhuxavier
10-Oct-13 8:31am
View
<asp:GridView Width="100%" runat="server" ID="sh" AllowPaging="true"
ShowFooter="true" Showheader="true" GridLines="None" ondatabound="GridView1_DataBound">
christhuxavier
12-Sep-13 8:40am
View
hi we are allocating contact to context which is object. we can only retrun context not contact. if i do above you said, i
christhuxavier
12-Sep-13 7:35am
View
hi thank you for reply. i did what you said follows
context.ContactDetails.AddObject(contact);
context.SaveChanges();
return context;
but in return statemetn shows error like : cannnot implicitly converttype'winwebapi.chdbentities to winwebapi.contactdetail'
christhuxavier
9-Aug-13 11:48am
View
hi i think the .net 4.5 does not work on XP, while .net 4.0 works on every OS from XP till win8. right?
christhuxavier
5-Aug-13 4:55am
View
hi you are correct. so what i need, when you click node it will expand it's child , second time you will click some other node to expand it's child right? that time first time expanded node should collapse automatically.
Am i cleared. pls help me.
christhuxavier
2-Aug-13 8:25am
View
hi, simple solution.
if we remove var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
now works fine...
christhuxavier
1-Aug-13 2:46am
View
hi i did with prerender. but it is not working
christhuxavier
19-Jul-13 3:05am
View
thank you.
christhuxavier
15-Jul-13 6:51am
View
Hi naz, this is coding.
aspx;
<pre lang="xml"><asp:Content ID="fintree" runat="server" ContentPlaceHolderID="em">
<div style="overflow:scroll; width:200px; height:1000px;">
<asp:TreeView ID="ModuleTreeView" ExpandDepth="0" runat="server" ShowLines="true" PopulateNodesFromClient="True"
BackColor="#FFFFFF" style="width:300%" ForeColor="Black" HoverNodeStyle-ForeColor="BlueViolet"
ShowExpandCollapse="true" PopulateOnDemand="true" NodeWrap="true" >
</asp:TreeView>
</div></pre>
aspx.cs
namespace ShopGear1.View
{
public partial class treefin : System.Web.UI.Page
{
private string scon = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
scon = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["sqlconnectstring"].ConnectionString;
//ModuleTreeView.CollapseAll();
FillTreeView();
}
}
public DataTable GetModuleDetails()
{
using (SqlConnection conn = new SqlConnection(scon))
{
string sql = ""query;
SqlDataAdapter da = new SqlDataAdapter(sql, conn);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
public void FillTreeView()
{
DataTable modules = new DataTable();
modules = GetModuleDetails();
ModuleTreeView.Nodes.Clear();
PopulateTreeNode(modules, null, 0);
}
private void PopulateTreeNode(DataTable modulelist, TreeNode parent, int parentid)
{
TreeNodeCollection baseNodes;
TreeNode node;
if (parent == null)
{
baseNodes = ModuleTreeView.Nodes;
}
else
{
baseNodes = parent.ChildNodes;
}
foreach (DataRow dtrow in modulelist.Rows)
{
if (int.Parse(dtrow["parent_orid"].ToString()) == parentid)
{
node = new TreeNode();
node.Text = dtrow["descript"].ToString();
node.Value = dtrow["code_webcategory_id"].ToString();
//string ID = node.Value.ToString().Trim();
node.SelectAction = TreeNodeSelectAction.Select;
node.ImageUrl = string.Format("~/View/iw.aspx?category={0}&width=50", node.Value);
baseNodes.Add(node);
PopulateTreeNode(modulelist, node, int.Parse(dtrow["code_webcategory_id"].ToString()));
}
}
//ModuleTreeView.CollapseAll();
}
}
}
christhuxavier
11-Jul-13 9:09am
View
hi bitmapimage is throwing error in c# asp.net.
Show More