16,004,806 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 Harshil_Raval (Top 200 by date)
Harshil_Raval
12-Dec-13 1:56am
View
When you upload image, create small size of thumbnail image and show that images in repeater, it will surly improve your page performance. Also don't show all 140 images in repeater at a time. create custom paging to display images.
Harshil_Raval
11-Dec-13 7:44am
View
see updated reply.
Harshil_Raval
11-Dec-13 7:24am
View
try to debug in that foreach loop. I am not able to find any issue in that.
Harshil_Raval
11-Dec-13 7:20am
View
it should be in onrowdatabound or onrowcommand events..
Harshil_Raval
11-Dec-13 7:18am
View
ok.
in which method you are calling this..
HtmlAnchor Link = (HtmlAnchor)lDgModel.FindControl("Link");
Harshil_Raval
11-Dec-13 7:13am
View
what is datatype of class in classTb?
Harshil_Raval
11-Dec-13 7:06am
View
To access any control one must have runat="server". otherwise it will not access on code behind.
Harshil_Raval
11-Dec-13 6:32am
View
Check that you have call ddlbind() method in page load in
if(!isPostback)
{ddlbind();}
Harshil_Raval
11-Dec-13 5:28am
View
Href should work.
Harshil_Raval
11-Dec-13 0:37am
View
Not clear.
Harshil_Raval
10-Dec-13 2:32am
View
thanks. :)
Harshil_Raval
10-Dec-13 2:30am
View
yes
Harshil_Raval
10-Dec-13 2:19am
View
that is not possible. selectedindex event call when you change index in dropdown by selecting it, not by changing it in coding.
Harshil_Raval
10-Dec-13 2:08am
View
wait, you mean on button click you have changed selected index of dropdown, so it should call selectedindexchanged event of dropdown!!!!
Harshil_Raval
10-Dec-13 1:54am
View
Check in your page load method. Have you put your dropdown fill method in !ispostback().
Harshil_Raval
9-Dec-13 0:23am
View
what you mean by .net page and c# page?
Harshil_Raval
29-Nov-13 2:09am
View
what is regid here? is it value of label?
Harshil_Raval
28-Nov-13 1:40am
View
You can go for windows service. see these link https://www.google.co.in/#q=c%23+windows+service+asp.net
Harshil_Raval
30-Oct-13 3:20am
View
Suppose in datatable1 in name column value is "Test" and same is exist in datatable2. Then what you want to do?
Harshil_Raval
30-Oct-13 3:11am
View
There is no problem with any number of row. What i have done is first get minimum value from particular column from datatable1. then same for datatable2. and then finally insert minimum value in datatable3. Number of rows does not matter here. But you should know from two table, on which column you want to get minimum value.
Harshil_Raval
30-Oct-13 1:58am
View
Is it gives any error or what?
also,
SqlCommand cmd = new SqlCommand("select * from bankadmin where Accountno=@Accountno");
you have specify select query in sqlcommand, and after that you are giving sql type as stored procedure and passing sp name!!!! also, you have not specify connection to sqlcommand...
Harshil_Raval
30-Oct-13 1:29am
View
Same question asked http://www.codeproject.com/Questions/675972/Only-one-concurrent-login-per-user-in-Asp-net before 1 min.!!!!!!
Harshil_Raval
30-Oct-13 1:22am
View
Just do one thing. In your database, in your usertable, add one bit field called IsLoggedin. when user login check for true or false value. If value is true(i.e. already logged in), then automatically redirect to home page. and if value is false(not logged in), then update that value to true, and redirect.
Harshil_Raval
29-Oct-13 7:50am
View
Oh!!!Removing...
Harshil_Raval
29-Oct-13 7:33am
View
Agree with RyanDev. Also, there is one font called "cufon" font. it also does that.
Harshil_Raval
29-Oct-13 6:08am
View
Yes you can do it easily..
first select your desired fields from table1 by email id(email id should be unique in table1).
select UserID,Level from table1 where emailid=txtemail.Text
That's it. you have now userid and level. now you can insert it in table2.
Harshil_Raval
28-Oct-13 7:19am
View
Yes, that is better way.. :)
Harshil_Raval
28-Oct-13 6:10am
View
According to me that's not possible, when you add new column dynamically in datatable, it will inserted at last index. But why you want to insert new column in between Name and Address? I don't see any reason behind it.
Harshil_Raval
28-Oct-13 0:13am
View
what error it gives to you? have you trace it? It's ok if you have defined connection string in your presentation layer in web.config, it should not give any error. It should work. Give error message so that we can help you.
Harshil_Raval
25-Oct-13 7:45am
View
Posted it as solution. Ok.
Harshil_Raval
25-Oct-13 7:29am
View
When you change in code and build code, every time new version of dll is generated in bin folder. With your coding file, take bin folder too.
Harshil_Raval
25-Oct-13 2:40am
View
see this..
string strQuery = "select * from stv where rdate =@Textbox6.text";
replace @Textbox6.text with @rdate.
Harshil_Raval
25-Oct-13 2:35am
View
On which line you are getting this exception?
Harshil_Raval
25-Oct-13 2:16am
View
Update your question with more detail.
Harshil_Raval
25-Oct-13 2:09am
View
Update your question, with more detail.
Harshil_Raval
25-Oct-13 1:59am
View
See this link for creating report http://www.mssqltips.com/sqlservertutorial/240/create-a-report-using-the-report-designer/
to call report in coding see this..
http://forums.asp.net/t/1281716.aspx
Harshil_Raval
25-Oct-13 1:45am
View
This type of project can not be referenced.
Harshil_Raval
25-Oct-13 1:28am
View
Which type of project you have created for your 4th layer? It should be Class Library type of project.
Harshil_Raval
25-Oct-13 1:21am
View
So, are you not able to see any generated dll of your 4th layer?
Harshil_Raval
25-Oct-13 0:59am
View
First build, your 4th project(report). Then in your main project, right click on reference and add dll of your 4th project as reference. It should add to your main project.
Harshil_Raval
24-Oct-13 9:02am
View
Then you must have give button class as sidebar. then remove it..Create other class for next button.
Harshil_Raval
24-Oct-13 8:51am
View
Is it works for you?
Harshil_Raval
24-Oct-13 7:15am
View
Hi, what is your requirement. Do you want to insert number in dropdown, then see below..
DropDownID.Items.Insert(0, new ListItem("100", "100"));
Harshil_Raval
24-Oct-13 7:07am
View
Check updated reply.
Harshil_Raval
22-Oct-13 8:18am
View
OK. Thanks. :)
Harshil_Raval
22-Oct-13 8:15am
View
Oh!!! Any time. :)
Harshil_Raval
22-Oct-13 5:47am
View
I don't get you. Do you want to get id of icon? I think you want to use it in listview but do not want to display it? If yes, then use hiddenfield in listview and bind id to it.
About icon hits, use onItemCommand event of listview to get selected icon id which is inside hiddenfield and accordingly fire db query to plus icon visit.
Harshil_Raval
21-Oct-13 3:36am
View
hi,
items.Value = code + '_' + name;
what is items here? also you have not specified display text value for this.
Harshil_Raval
18-Oct-13 9:28am
View
+5 :)
Harshil_Raval
18-Oct-13 9:24am
View
Yes, it will not. But if do some trick then we can do it. say for example, before redirect code save one flag value in session. Then on page load check if session is not null, then print relevant message, then remove session.
Are you with me now?
Harshil_Raval
18-Oct-13 8:41am
View
Hi, are you sure that sql statement is allowed in dataview rowfilter?
Harshil_Raval
18-Oct-13 8:02am
View
hi, you are using sql query in rowfilter!!!!!!!!!
It's not possible my friend.
Update your sp instead.
Harshil_Raval
18-Oct-13 3:11am
View
glad to help you..
Harshil_Raval
18-Oct-13 1:57am
View
have you add any addon like firebug in firefox? then check in error console, there must be some error. Also check for your reference of dll, that it is working fine. Also, to check just add any other ajax control like watermarkextender. If it works fine or not..
Harshil_Raval
18-Oct-13 1:48am
View
My toolkit version is older than you, still it's working.. in which browser you are checking?
Harshil_Raval
18-Oct-13 1:45am
View
At time of binding data you know which kind of data to bind(either table or just string)? if yes then easiest way is to just hide show controls according to your requirement.
Harshil_Raval
18-Oct-13 1:42am
View
hi, i just copy paste your html on my side, it's working fine. Which ajaxtoolkit version you are using?
Harshil_Raval
18-Oct-13 1:34am
View
Hi, you have created dynamic textbox. Right. So, it will not fire any serverside event, you have to handle it with javascript onkeydown or onkeyup event.
Harshil_Raval
18-Oct-13 0:34am
View
Hi, first debug your code and add watch to this Convert.ToDecimal(skillLevelCmbo.SelectedValue). See it's value is getting roundup or not. If it's value is fine, then check your sp.
Also, you forget to add comma in last parameter,
cmd.Parameters.AddWithValue("@userSkillLevel",(Convert.ToDecimal(skillLevelCmbo.SelectedValue)));
Harshil_Raval
17-Oct-13 8:20am
View
I think on blur event you want to fire some event. then use onBlur event instead of onKeyDown.
Harshil_Raval
17-Oct-13 4:15am
View
OK, sorry for that,dr[0].ToString() will have only date value or date and time value?
Harshil_Raval
17-Oct-13 3:26am
View
Which part of code is not working in chrome?
Harshil_Raval
17-Oct-13 3:18am
View
Please be more specific about your question. Update your question with more detail.
Harshil_Raval
17-Oct-13 0:26am
View
I must say, your coding pattern is very bad.. Why you are checking whether user is exist or not on every postback event? see in page_Load method you have if condition if(Postback)!!!!!! Other thing, your sql command userExist is having select statement, and still you are using ExecuteScalar to get results!!!!! Also, in Page_Load event you have open connection, but no con.Close()!!!!!!! First correct these errors....
Harshil_Raval
15-Oct-13 5:33am
View
You can not fire server side click event of dynamically generated control. You have to handle it with jquery/javascript.
Harshil_Raval
9-Oct-13 0:17am
View
It seems confusing, because you said that your jquery calander have format "dd/MM/yy", then how can you get value like "24/03/2013"? it should be "24/03/13". correct me if i am wrong.
Harshil_Raval
7-Oct-13 1:08am
View
Not enough detail to solve your problem. Post your code. Also, are you facing any error or it is just not displaying?
Harshil_Raval
4-Oct-13 5:48am
View
No idea about this. Better is to create another post regarding this query, so that other can answer it.
Harshil_Raval
4-Oct-13 5:34am
View
try to change yourpost_date datatype from Date to DateTime.
or do this...
DateTime dt = DateTime.Today;
string insertSQL = "INSERT INTO user_posts (";
insertSQL += "post_title, post_data, post_date, user_id) ";
insertSQL += "VALUES (";
insertSQL += "@post_title, @post_data, @post_date, @user_id) ";
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFileName=|DataDirectory|\Database.mdf;Integrated Security=True;MultipleActiveResultSets=True");
SqlCommand cmd = new SqlCommand(insertSQL, con);
//Add Parameters
cmd.Parameters.AddWithValue("@post_title", txtTitle.Text.Trim());
cmd.Parameters.AddWithValue("@post_data", str);
cmd.Parameters.AddWithValue("@post_date",dt);
cmd.Parameters.AddWithValue("@user_id", "1");
see if it works.
Harshil_Raval
4-Oct-13 5:15am
View
One of your field exceed length. Can you post your db structure. or check twice, your field have enough space to store value.
Harshil_Raval
4-Oct-13 5:11am
View
Yes it is possible. But how you want to do it? On click of any button or other things? Please specify.
Harshil_Raval
4-Oct-13 5:07am
View
see this link is posted as error <img src="http://i39.tinypic.com/b97jol.png" border="0" alt="">.
I have check "http://i39.tinypic.com/b97jol.png" this url. in this there is an image.
From that error message i assume this. and the error is ToString() type of casting is not valid in linq query.
Harshil_Raval
4-Oct-13 4:16am
View
Check my answer.
Harshil_Raval
4-Oct-13 3:09am
View
Ok wait. I will generate small code and revert back to you.
Harshil_Raval
4-Oct-13 2:48am
View
Your only way is to create global variable in global.asax. On click of any link first assign value to global variable. And in that link, on page load check for assigned value. if it match then valid. if not match then redirect to your invalid access page.
Harshil_Raval
4-Oct-13 2:31am
View
Dont' repost same question again.
http://www.codeproject.com/Questions/663024/Restrict-Direct-URL-Access-by-URL-Modification
Harshil_Raval
4-Oct-13 2:30am
View
Ok. i think you have some page it have one menu, and on click of menu it should redirect to that page, not by direct url. Right? Or clear your requirement.
Harshil_Raval
4-Oct-13 2:25am
View
If you find something better, then update my answer so that other can get best answer. :)
Harshil_Raval
4-Oct-13 1:44am
View
Can you post your master page design?
Harshil_Raval
4-Oct-13 1:27am
View
Is this regarding login access or like it? Use session and check on page if session not available then redirect to your login page.
Harshil_Raval
3-Oct-13 0:16am
View
Ok. i will, if i can. :)
Harshil_Raval
1-Oct-13 9:17am
View
Hi tadit, i think this will not work. we have to use jquery. what you say now?
Harshil_Raval
1-Oct-13 8:00am
View
Hi, rakesh thanks for your help. But if you have read my question carefully, then my requirements are completely different.
Harshil_Raval
1-Oct-13 7:46am
View
hi tadit, i just download this code, but
var lastRowNumber = parseInt($("[id$=gvCustomers] tr").eq($("[id$=gvCustomers] tr").length - 1).index()) + 2;
$("#btn", row).attr("href", "javascript:__doPostBack('gvCustomers$ctl" + (lastRowNumber + 1) + "$btn','')");
these two lines in javascript function are commented. If i run it then it is going in rowcommand event, but it is having that old issue, rowargument is defferent then it should be. And if i uncomment this code then it is not going in rowcommand event. All this scenario is after scroll down and new data generated.
Harshil_Raval
1-Oct-13 7:29am
View
I have updated onsuccess function in code with your modified function. But after implementing this, click event is not going in gridview's oncommand event.
Harshil_Raval
1-Oct-13 5:21am
View
Hi tadit, have you found any solution for this problem?
Harshil_Raval
1-Oct-13 4:33am
View
Hi, it's great.. I give you +5 for your effort. It is calling gridview rowcommand event for dynamically generated linkbuttons too..
But, it is having one problem, as you are getting clone of first row in javascript and replacing value. But, see on gridview's row command event of dynamicaaly generated row, it's commandargument's value is same as first row of gridview's command argument. I hope you get me. Except this every thing is fine.
But still, very good try, i appreciate your work.
Harshil_Raval
1-Oct-13 3:12am
View
Ok. Thanks.
Harshil_Raval
1-Oct-13 2:46am
View
ohh!!! my generated a tag is again replaced by Click. i think codeproject does not allow it. pls see it by firebug or other tools.
Harshil_Raval
1-Oct-13 2:45am
View
<tr>
<td>Ann Devon</td>
<td>London</td>
<td>UK</td>
<td>WX3 6FW</td>
<td>
Click
</td>
</tr>
Here i am manually adding href attribute for all jquery generated linkbutton. you can see it in success function.
Harshil_Raval
1-Oct-13 2:33am
View
In this case, it postback but, still not going in gridview commandevent.
Harshil_Raval
1-Oct-13 2:31am
View
Here $(".test1", row).html("Click");
click is this a id="btn" href="javascript:__doPostBack(\" gvcustomers$ctl"="" +="" no="" "$btn\",\"\")"="">Click
Harshil_Raval
1-Oct-13 2:29am
View
hi,
function OnSuccess(response) {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
pageCount = parseInt(xml.find("PageCount").eq(0).find("PageCount").text());
var customers = xml.find("Customers");
$("[id$=gvCustomers] .loader").remove();
var k = 2;
customers.each(function () {
var customer = $(this);
var row = $("[id$=gvCustomers] tr").eq(0).clone(true);
$(".name", row).html(customer.find("ContactName").text());
$(".city", row).html(customer.find("City").text());
$(".postal", row).html(customer.find("PostalCode").text());
$(".country", row).html(customer.find("Country").text());
var no = ((pageIndex - 1) * 10) + k;
$(".test1", row).html("
Click
");
$("[id$=gvCustomers]").append(row);
k++;
});
//Hide Loader
$("#loader").hide();
}
Harshil_Raval
1-Oct-13 1:04am
View
For first 10 rows i can see href attribute, but for newlly created rows by jquery, i am not able to add or see href attribute. so, again problem remains problem....:-( I have searched on net for this, but in all examples they handle it with jquery not with gridview command event.
Harshil_Raval
1-Oct-13 0:11am
View
Ok. I am trying now. I let you know as it is done..
Harshil_Raval
30-Sep-13 9:27am
View
Thanks. waiting for your reply. it's time to go home. see you tomorrow.
Harshil_Raval
30-Sep-13 9:14am
View
No, it is not having anything like it, because i have not create button's click event, i am handling it with gridview command event. only diffence is my jquery created 10 buttons have same id "btn" and those first buttons have different ids like 'btn_01','btn_02'...etc. actually i am creating one demo to achieve this case, but i am tired now, i think it is not possible in this case, we have to handle it with jquery. What you think Tadit?
Harshil_Raval
30-Sep-13 8:26am
View
What i think is it will never fire grid rowcommand event. But i am not sure about it. Can you make me clear? whether it is possible or not? According to me it is not possible. If it is possible, then pls give me link to that explaination othervise give me some short of code for it.
Harshil_Raval
30-Sep-13 8:24am
View
I think you missunderstood my question. Let me explain, see my gridview design. Now on page load suppose i am binding 10 records to this grid. Now as i scroll grid div, it will fire jqueryevent and call webmethod and get another 10 records from db. Now, problems occurs here, because first 10 records are able to fire rowcommand event, where as next 10 records, which i loaded by jquery, that rows button is not firing rowcommand event. So, this is my problem...
Harshil_Raval
30-Sep-13 5:53am
View
Hi, tadish see my gridview html,
<asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="false" CssClass="Grid"
OnRowCommand="gvCustomers_RowCommand" Width="600">
<columns> <asp:BoundField DataField="ContactName" HeaderText="Customer Name" ItemStyle-CssClass="name"
ItemStyle-Width="200" HeaderStyle-Width="200" />
<asp:BoundField DataField="City" HeaderText="City" ItemStyle-CssClass="city" ItemStyle-Width="100"
HeaderStyle-Width="100" />
<asp:BoundField DataField="Country" HeaderText="Country" ItemStyle-CssClass="country"
ItemStyle-Width="100" HeaderStyle-Width="100" />
<asp:BoundField DataField="PostalCode" HeaderText="Postal Code" ItemStyle-CssClass="postal"
ItemStyle-Width="100" HeaderStyle-Width="100" />
<asp:TemplateField>
<itemtemplate>
<asp:Button ID="btn" runat="server" ClientIDMode="Static" CommandName="click" Text="Click" CommandArgument='<%# Bind("ContactID") %>' />
Now on scroll i am binding data dynamically. Now problem is i am not able to fire button event as gridview command event.
Harshil_Raval
30-Sep-13 2:52am
View
but i am loading data dynamically, so how to set commandname and commandargument to dynamically loaded button?
Harshil_Raval
28-Sep-13 8:37am
View
whether error comes this time? or just image is not displaying? do one thing try to remove @Url.Content. <img src="ViewBag.Imagepath" />. I am not sure, it will work or not. but you can try for this.
Harshil_Raval
28-Sep-13 7:52am
View
hi. You are binding Viewbag value in HttpPost, that is on any postback event. Right? But when that view first time called, you have not set viewbag value, that is why it is throwing error. Hope you got me.. atleast add blank value in viewbag when calling view first time.
Harshil_Raval
28-Sep-13 7:45am
View
What is not working? Are you not able to call that function on change event? or function is not working as your need?
Harshil_Raval
28-Sep-13 7:11am
View
That is because, may be you have not bind ViewBag.Imagepath value. On controller before calling to view, bind path in this viewbag.
Harshil_Raval
28-Sep-13 0:28am
View
So, your php app works fine on server right. But it's not working in asp.net. As per my knowledge to use mysql you have to install mysql connector, whether it is your local system or server!!! I am not sure how to handle it on server, as we don't have rights to do so. Just contact to admin again, and ask for the same.
Harshil_Raval
28-Sep-13 0:24am
View
Hi, this error shows that you have not implement method UPanle_DataBinding in your code. Are you sure you have implement this method?
Harshil_Raval
27-Sep-13 4:48am
View
Hi, First download and install mysql connector from http://dev.mysql.com/downloads/connector/net/1.0.html. If you don't know how to do it. then follow this http://dev.mysql.com/doc/refman/5.6/en/connector-net-installation-windows.html. Then Get mysql.data.dll from application installed path/bin. In bin folder you will find this dll. Then search on google for demo app. one link from that is http://www.codeproject.com/Articles/43438/Connect-C-to-MySQL. After creating your app. Just clean,build and publish it. Make sure in bin folder you have your mysql.data.dll. It should work for you. Best of luck.
Harshil_Raval
27-Sep-13 3:30am
View
Hi, My first question is, have you install mysql connector in your pc(system). And it is working fine in your system. If it's working fine, then contact your server administrator for this problem. Whether, they provide access to mysql or not. You should ask them before publishing your app. First contact them and ask about this.
Harshil_Raval
27-Sep-13 3:19am
View
Hi, how you get this mysql.data.dll? I think you have followed this steps.
http://dev.mysql.com/doc/refman/5.6/en/connector-net-installation-windows.html
If yes, then check on your server.. have these steps followed or not?
Harshil_Raval
27-Sep-13 2:46am
View
Then what is DataAccess here?
Harshil_Raval
26-Sep-13 9:28am
View
So, DataAccess is your static class name, in which you have created, static function GetConnected. From this you are getting connection string. Right?
Harshil_Raval
26-Sep-13 8:56am
View
At which line you are facing this error? The name 'DataAccess' does not exist in the current context
Harshil_Raval
26-Sep-13 8:05am
View
hi, there is no method like gridview.bind()!!! To bind grid you must have one datasource, and then you can bind grid.
gridview.DataSource = your datasource;
gridview.DataBind();
Harshil_Raval
26-Sep-13 7:13am
View
Hi, i think you are trying to use this textbox in some static function. That's why you are not able to access textbox.
Harshil_Raval
26-Sep-13 6:14am
View
hi, what you mean by good size image? Do you want to replace image, when you hover on image control?
Harshil_Raval
26-Sep-13 3:03am
View
hi, build your application. then try to use it like, <uc:UserInformation ID="userinfo" runat="server" />
Harshil_Raval
26-Sep-13 2:58am
View
So, what is your question?
Harshil_Raval
18-Sep-13 9:06am
View
If you want to change your question, don't repost it. You can change it by clicking Improve question.
Harshil_Raval
18-Sep-13 7:53am
View
!!! Don't copy others answer. Give your own answer.
Harshil_Raval
18-Sep-13 6:22am
View
If you got your answer, then mark it as answer.
Harshil_Raval
18-Sep-13 3:44am
View
Ohh! don't make session so heavy. Why you want to store these 50 field value in session?
Harshil_Raval
17-Sep-13 9:12am
View
It looks good. try to add return true; in if condition. Are you sure it is going in if condition, not in else.
Harshil_Raval
17-Sep-13 9:06am
View
where is your javascript function ValidateMonthandYear?
Harshil_Raval
17-Sep-13 8:24am
View
In that case, take DropdownList in updatepanel. It will solve your issue.
Harshil_Raval
17-Sep-13 8:23am
View
No, i think when when you are getting substring value, at that lines you are committing mistakes.
LnkMSid.Text.Substring(iStart + 1) this should be
LnkMSid.Text.Substring(iStart + 1,LnkMSid.Text.Length-1)
Harshil_Raval
17-Sep-13 8:17am
View
Hi, row deleting works. Then why
DropDownList2.Items.RemoveAt(DropDownList2.SelectedIndex);
is not removing value from dropdown!! It should work.
Harshil_Raval
17-Sep-13 8:14am
View
Ohh!! This whole string can not be trim. How this complex value is binding in gridview? Stop binding this. And display it in different column, like Date, AgentName, Email etc.. Hope you got me..
Harshil_Raval
17-Sep-13 8:04am
View
Sorry, but from your this comment, i can't get what you want exactly, please reformat your comment.
Harshil_Raval
17-Sep-13 7:18am
View
Hi,
string value = LnkMSid.Text.Split('/').ToString();
if (value.Length > 0) {
LnkMSid.Text = value[0].ToString();
}
You have posted this code in comment. But this is not right. It should be
string[] value = LnkMSid.Text.Split('/');
if (value.Length > 0) {
LnkMSid.Text = value[0].ToString();
} Check by implementing this code. It should give you your desire result. Say for example your string="SR-1212323/assigned". Then after split, string value will be SR-1212323.
Harshil_Raval
17-Sep-13 6:55am
View
So, you got currect output?
Harshil_Raval
17-Sep-13 6:53am
View
Check my updated answer.
Harshil_Raval
17-Sep-13 6:12am
View
DateTime[] strAGREEMENT_DATE = ds.Tables[0].AsEnumerable()
.Select(row => row.Field<datetime>("Agreement Date"))
.ToArray();
Here, "Agreement Date" is field value comming from excel. Right. check in your excel, there must be some value which is not datetime.
Harshil_Raval
17-Sep-13 6:04am
View
Hi, Are you sure AgreementDate is having datetime value. and it is "Agreement Date" not "AgreementDate"? Because your query looks fine. And other possibility is your dataset ds is null.
Harshil_Raval
17-Sep-13 3:39am
View
I am posting it to answers. Check it..
Harshil_Raval
17-Sep-13 3:36am
View
OK, try to change your linq query to this,
var prices= from st in obj.Wishlist_tables
join X in obj.movie_details on st.movie_id equals X.Id
where st.username == Session["user"].ToString()
select X.price;
And then count it..
int count=0;
foreach(var objdata1 in prices)
{
count+=Convert.ToInt32(objdata1);
}
Harshil_Raval
17-Sep-13 3:03am
View
int count=0;
foreach(var objdata1 in prices) {
count+=Convert.ToInt32(objdata1);
}
Harshil_Raval
17-Sep-13 3:01am
View
Hi, try this,
var prices= from st in obj.Wishlist_tables
join X in obj.movie_details on st.movie_id equals X.Id
where st.username == Session["user"].ToString()
select new { X.price }.DefaultIfEmpty();
And your rest of code.
Harshil_Raval
17-Sep-13 2:51am
View
So, here numb is list of integer. Right? You want to count these numbers?
Harshil_Raval
17-Sep-13 2:41am
View
Just cast it to integer and add other prices to it, and display in label. What problem you face here?
Harshil_Raval
17-Sep-13 2:39am
View
Yes, just go loop through your list, and find list item and delete it..
Harshil_Raval
16-Sep-13 7:17am
View
Click on Edit. Find IIS_Users in username list. If it is not there, then click on Add-> Advanced-> FindNow. It will list username list, from there find IIS_Users. Click ok. and finally add read,write access write to that user.
Harshil_Raval
16-Sep-13 5:59am
View
Hi, e-commerce is large topic, but in short, you should add visiteddate "datetime" field in db. and according to field value get latest visited products.
Harshil_Raval
16-Sep-13 3:06am
View
Hi, you want to call server side event, when textbox value change? or after changing value on some button click event you want to get textbox value?
Harshil_Raval
13-Sep-13 9:29am
View
which bin? classlibrary? If yes, then you can directly copy it and paste in server. No problem for that.
Harshil_Raval
13-Sep-13 8:42am
View
No, you have to rebuild your application and after that publish your website to your system. Then copy all files and folders except css,jquery,images types of folders. In case you change or add new css or jquery or image, copy that too. And finally deploy it on server.
Harshil_Raval
13-Sep-13 3:23am
View
Sorry, you have to change your logic, if you want to use same page, you must create master page for you admin too and add master page dynamically accordingly logged in user. This is the only solution, or create two different page.
Harshil_Raval
13-Sep-13 3:14am
View
Sorry, varun but it is not possible. You can not handle this in single page.
Harshil_Raval
13-Sep-13 3:10am
View
Ok.Same page is used for both admin and user. For admin it does not require master page to add in this page, but for user master page must be add to this page. Is this your requirement?
Harshil_Raval
13-Sep-13 3:05am
View
Check, your web page don't have any <head> or <body> tags, it should have only <asp:Content..> tag. If you have all html structure in your web page and if you add masterpage file to your web form, then imagine structure, already master page have full structure and it is add to your web page, which also have full html structure!! it will always fire error. Do one thing, create your page with use of master page. after creating your page, remove MasterPageFile from <#@ Page ..%> tag. and dynamically add masterpage.
Harshil_Raval
13-Sep-13 2:51am
View
So, have you got any error in this code?
Harshil_Raval
13-Sep-13 2:47am
View
What!!! you want to convert your asp.net web application into single .dll file!!! When you build your application by default .dll of your application is created in your projects bin folder. But you can not deploy only .dll file to server. You can create class library project. After building that project you can use generated dll of that class library project in other web application. Again you can not deploy this class library project's dll alone, since it is not web application. Hope you got it.
Harshil_Raval
13-Sep-13 2:41am
View
Are you sure, assetno field value does not contain any character? If it contains character then at i = Integer.Parse(r("assetno").ToString()) + 1, it will give you an error. I am not familiar with vb code. but i found code to fetch number from string. Dim number = r("assetno").ToString().Split(" "c).Where(Function(f) IsNumeric(f)).FirstOrDefault, Then use this Dim number in your logic.
Harshil_Raval
11-Sep-13 9:20am
View
hi, just add this css to your textbox. <asp:Textbox style="text-transform:capitalize;" ..>
Harshil_Raval
11-Sep-13 3:26am
View
Can you give more detail about your db structure? Because every time on selected index change event of dropdown, you must call to db for last input of your desire string. and according to that you need to add +1 counter to it and show in textbox.
Harshil_Raval
10-Sep-13 0:54am
View
Hi as you said you are using ajax method to call you can do it as
var value = $('#<%= txtEmail.ClientID %>').val();
$.ajax({
type: "POST",
url: "../user/register.aspx/BindDatatable",
contentType: "application/json; charset=utf-8",
data: "{'email': '" + value + "'}",
dataType: "json",
success: function (data) {
},
failure: function (data) {
}
});
// your server side method
public static UserDetails[] BindDatatable(string email){//your code}
Harshil_Raval
9-Sep-13 7:45am
View
Not clear. please describe your question. what exactly you want to do?
Harshil_Raval
9-Sep-13 6:29am
View
In webmethod you can not access any server side control. To access textbox value, just pass it in your function.
public static UserDetails[] BindDatatable(string email){//your code}
Harshil_Raval
9-Sep-13 6:16am
View
in stored procedure you can use print command to print your message. e.g. print('test')
Harshil_Raval
6-Sep-13 9:15am
View
ok, then use string[] array = System.Text.RegularExpressions.Regex.Split("yourstring", "stringseperator");
Harshil_Raval
6-Sep-13 6:36am
View
Yes it will fire exception because by passing true as parameter it force page to redirect to other page. At that time you must handle this redirect command in try,catch. I am not sure but if you pass false as parameter then it will not fire exception, use this if there is no problem if your next code run.
Harshil_Raval
6-Sep-13 6:28am
View
<asp:Button ID="btnSave" runat="server" Text="Save" /> // remove onclick event
//call click event
<script type="text/javascript">
$(function () {
$('#<%= btnSave.ClientID %>').click(function () {
var listoftxts = $('#<%= pnlDate.ClientID %> input[type="text"]');
var values;
for (var i = 0; i < listoftxts.length; i++) {
values += 'txt ' + i + ' value = ' + listoftxts[i].value + '</br>';
}
alert(values);
});
});
</script>
Harshil_Raval
6-Sep-13 6:18am
View
This exception shows that, redirect command execute before page complete it's call. In simple words, in your function, after your redirect command still some code need to perform. That's why it throw error. To control this behavior, Response.Redirect have two parameters. One is path and second is boolean value. which shows page should abort executing remaining code and redirect or execute code and then redirect to your path.
Harshil_Raval
6-Sep-13 2:36am
View
see at the end of your asp:Content ID="Content2", there is </td> without no table or tr structure. Remove it and check, hope it helps.
Harshil_Raval
4-Sep-13 1:19am
View
No, for this you should use boolean value. change your db field from string to bit
Harshil_Raval
3-Sep-13 8:08am
View
Hi, as you said your database have value 'T' and 'N'. Then in your sp or query, you must check for this values, if 'Y' then convert to 1 and if 'N' then convert to 0. It may solve your issue.
Harshil_Raval
6-Aug-13 9:09am
View
Your error shows that you have call event from design side but you have not add it in code behind. you need to add PageIndexChanging event on code behind file. like in your example protected void GridView2_PageIndexChanging(Object sender, GridViewPageEventArgs e). hope you have not delete this on code behind. Because it must be there when you call it from design side.
Harshil_Raval
6-Aug-13 7:50am
View
Agree with you. And other things is what you mean by gridview page number? Are you talking about paging?
Harshil_Raval
6-Aug-13 7:43am
View
You are right bro..
Harshil_Raval
6-Aug-13 7:03am
View
Hi, you are binding dropdown on load or on event of any other control. Please specify.
Harshil_Raval
6-Aug-13 6:36am
View
It's easy when you copy your session in your variable. After that remove it. What is your problem? What error you accident with? In your example after int counta variable remove session. Session.Remove("AddToListCount")
Harshil_Raval
6-Aug-13 6:29am
View
Do you add AjaxControlToolkit in your app. If yes then, You can use CalendarExtender. If not then http://jqueryui.com/datepicker/ check this link.
Harshil_Raval
6-Aug-13 6:19am
View
Hi, why you want to display calender in dropdownlist? You should use textbox. On click of textbox calender popups. There are many jquery available for this.
Harshil_Raval
6-Aug-13 5:22am
View
What do you mean by selected value? When you select value from Autocomplete textbox, that value stores in textbox. So, you can easily get value by textbox.Text. What is your problem?
Harshil_Raval
5-Aug-13 8:55am
View
Right. For aspx page in function confirmmessage() in $.ajax({ change url: "Demo.aspx/DeleteSupplierDetails", here replace Demo.aspx with your page name. ok now.
Harshil_Raval
5-Aug-13 8:20am
View
add static keyword in your DeleteSupplierDetails it should be like public static Boolean DeleteSupp... And don't forget to add [System.Web.Services.WebMethod(true)] exactly top of this function. And in your aspx page , change url, demo.aspx to your page name in which you are working. ok.
Harshil_Raval
5-Aug-13 8:07am
View
Hi, friend no one will post their email id here. don;t worry ask question i will give you answer, if i can. For more detail of this kind of method search on google, there are lot's of articles which can help you more than me. :-)
Harshil_Raval
5-Aug-13 7:56am
View
Check again updated code.
Harshil_Raval
5-Aug-13 7:49am
View
public Boolean DeleteSupplierDetails(String R1, String R2, String R3, String R4) it should be public static Boolean DeleteSupplierDetails(String R1, String R2, String R3, String R4). And from design side, in $.ajax, hope you have passed your parameter. They can be specify in data:{R1:'" + value+ "', R2:'" + Value+ "', R3:'" + Value+ "', R4:'" + Value+ "'}",
Harshil_Raval
5-Aug-13 7:42am
View
In code behind of your page. Other way is to create webservice, and call this function from web service.
Harshil_Raval
5-Aug-13 7:29am
View
now check.
Harshil_Raval
5-Aug-13 7:23am
View
To achieve it use jquery ajax method. You can find out many tutorials and post about this.Check my updated code.
Harshil_Raval
5-Aug-13 6:58am
View
I am not sure how to change heading of confirm message. But for button event see my answer, i have comment //yes, means when ok button clicked flow comes in that section, and if cancel button clicked then see //No, flow will come in that section. For changing header of confirm, think you can not change it. If you really need to change it, then create your own popup. There are many js available for it.
Harshil_Raval
2-Aug-13 8:03am
View
Hi, if !IsPostBack is added then that will call at the time of page load. After that while any number of postback it would not call. Please check again by using if(!IsPostBack) x=0; It should work.
Harshil_Raval
2-Aug-13 7:42am
View
Why you want to clear value? Is this value uses in other page also? When you came back to page, value became 0. I have tried it.
Harshil_Raval
2-Aug-13 7:08am
View
You mean to say, column name to Grand total, then select Null As GrandTotal,sum(Emp_Contrii),sum(Comp_Contri),sum(total)
Harshil_Raval
2-Aug-13 6:32am
View
I can not understand your need here. Please describe it little bit more, or create new question for it.
Harshil_Raval
2-Aug-13 6:31am
View
Hi, I am not working in vb. So, to get help post this as seperate question so that someone can help you.
Harshil_Raval
2-Aug-13 2:31am
View
Pls describe more, what you actually want to do..
Harshil_Raval
1-Aug-13 8:45am
View
Thanks. If you found your answer then mark it as answer. :-)
Harshil_Raval
1-Aug-13 8:00am
View
Why you need commit command. After update command it should commited to db. How you are firing update command and it's c# code?
Harshil_Raval
1-Aug-13 7:03am
View
right. For image button use $("#yourgridid input[type='image'][id^='yourimagebuttonid']") see edited answer above.
Harshil_Raval
1-Aug-13 6:42am
View
You are right.But in grid view it is having pattern to create ids in each rows. use $("#yourgridid a[id^='your id']") instead of $('#link buttonid'). It will work.
Harshil_Raval
1-Aug-13 6:26am
View
check this, INSERT INTO Canteen(EMPID,CHECKTIME,CHECKTYPE,VERIFYCODE,SENSORID,LOGID) SELECT * from checkinout where sensorid in ('4','3')
Harshil_Raval
1-Aug-13 6:13am
View
hi, then change CAST(CHECKTIME AS DATETIME) to CAST(CONVERT(VARCHAR,CHECKTIME,108) AS DATETIME) and whole query will remain same.
Harshil_Raval
1-Aug-13 3:32am
View
Deleted
hi syed, if there are morethan 1 selected value, then imagine how your final query looks!!!Sorry, wrong code in foreach loop.
Harshil_Raval
1-Aug-13 1:28am
View
At least suggest me other software which fulfill my need.
Harshil_Raval
31-Jul-13 7:17am
View
check in your published folder, that your image folder exists or not? Also check for your image in that folder.
Harshil_Raval
31-Jul-13 7:10am
View
You said your application in Windows application. What you mean by deployment? are you creating exe of your project?
Harshil_Raval
31-Jul-13 6:57am
View
Yes, you can use javascript to change label text.
<script type="text/javascript">
onload = function () {
document.getElementById('lblMessage').innerHTML = 'new test';
}
</script>
Show More