Click here to Skip to main content
15,069,581 members

Comments by tanweer (Top 168 by date)

tanweer 18-Nov-13 6:34am View
post your error message or in which statment its giving error? Please provide some detail here so that we can help you.
tanweer 14-Oct-13 4:32am View
Yes thats what i was trying to explain you.
tanweer 14-Oct-13 3:13am View
yes, there are diffrent kind of solutions there, you may store the succss information in session, application variable or event in hidden fields also, but these are some risky tricks as storing these informations in database is more secure and in e-commerce applications you cannot take any risk.
tanweer 14-Oct-13 2:49am View
suggession is already given to you...
Create a table in your databse, now insert a record in it whenever a new transaction is made, iether successful or failure. your table will have a column named TransactionResult type of bit will store 1 for success and 0 for failure. Now add some code to check in this table before any transaction, if current transaction status is successfull then give a warning message to user.
tanweer 14-Oct-13 1:54am View
then I suggest you to sore this success/failure message in your database for this transaction ID and lock it for other user to make any transaction for the same trnsaction
tanweer 14-Oct-13 1:45am View
hi, let me know do you have any success message from the 3rd party after payment successfull?
tanweer 12-Oct-13 7:51am View
First of all in your script section add this to refrence jQuery
<script src="">
Then you need to set a CssClass of the Listview as .listview
just so simple :)
tanweer 12-Oct-13 7:49am View
thanks OriginalGriff, as i tested a sample code on my own by passing path like "D:\test\images" then it gives me same error of access is denied, and when i change the path to Server.MapPath then it works fine for me :) as for my answer is concern i think its good idea to give suggessions to anyone, no matter your all answers are accepted.
tanweer 12-Oct-13 7:12am View
kindly post your connectionstring here, it will atleast tells us how you set the database path
tanweer 10-Oct-13 0:35am View
Hi, CheckLogin is a Function in which you will compare your user name and password, if matched successfully then return true, and dvinvalid is a panel on the page that contains the Error lable
tanweer 8-Oct-13 10:04am View
no no, after each update in the datatable it is storing in session when complete all update just set the datasource with the updated databale
tanweer 8-Oct-13 9:53am View
ist its reset all fields of all rows then the gridview will be refreshed with all new fields with the help of dtTemp
tanweer 8-Oct-13 8:50am View
what is your issue, please post your assignment code where you are attempting to convert the data, if any exception then please post it here
tanweer 8-Oct-13 8:39am View
tanweer 8-Oct-13 6:36am View
either post your code or just let us know atlease how you are converting to file, what is the format of the file
tanweer 8-Oct-13 6:28am View
We are unable to have a Question here dude! Please explain and describe your question more clearly
tanweer 8-Oct-13 6:13am View
try the below link for more results
tanweer 7-Oct-13 9:23am View
hi, its not what the Vijaydhas wants, check my answer below, it will work
tanweer 7-Oct-13 7:24am View
set style="display:none;" for the button, it will be visible false on page load then will show/hide on your conditions
tanweer 7-Oct-13 2:58am View
yeah you may do that, just place the button inside the opening and closing tasgs of the image and do some css to adjust its position
tanweer 7-Oct-13 2:44am View
I just modified my answer, please check it now, this is working fine
tanweer 7-Oct-13 2:23am View
why don't you post these questions on google instead?
tanweer 7-Oct-13 2:20am View
add this before the script
<script src="//"></script>
tanweer 7-Oct-13 2:18am View
are you facing any issue, is there any error in your current code? Please explain little more
tanweer 7-Oct-13 2:06am View
did you add jQuery on your page, because it depends on jQuery
tanweer 7-Oct-13 1:55am View
I mean do you want just to add "/-" at the end of that string?
tanweer 7-Oct-13 1:51am View
what is the issue, did you get any error?
tanweer 7-Oct-13 1:40am View
Hi, PadRight is used to return string of a specified length in which the end of the current string is padded with spaces or with a specified Unicode character. what do you want here, what is the value of _averagekids and _averageadults in your code?
tanweer 7-Oct-13 0:58am View
no nned to add () sign here bro, this will not work
tanweer 4-Oct-13 5:52am View
do you know the Text property of html Anchor Element inside your WebBrowser?
tanweer 3-Oct-13 3:54am View
Hi, these two controls are not far different, just change DataGridViewRow to GridViewRow will solve your problem
tanweer 3-Oct-13 3:26am View
Ok, will you show your code here so that i can check what is going wrong there.
tanweer 3-Oct-13 3:12am View
what is your issue? Is there any exception in your code? Please explain
tanweer 2-Oct-13 7:22am View
Hi, "codes are red underlined" is not enough what we can give you a beter solution, please build the solution and get the exact error message and post here
tanweer 2-Oct-13 6:02am View
do you want to load all files in your dropdownlist?
tanweer 2-Oct-13 3:53am View
i have modified my answer, please check now
tanweer 2-Oct-13 3:36am View
what are the datatypes of these columns in database, will you please share here? right now i just guess that the StudentNumber may be int and you are supplying it as varchar, please check it again.
tanweer 2-Oct-13 3:33am View
then how you get only one row if there is no code written for get data? also what does the Show() here ?
tanweer 2-Oct-13 3:28am View
what is your issue, is there any exception, please explain little more
tanweer 2-Oct-13 3:16am View
will you please post your code here what you have done so far?? I suspect you are binding the gridview inside the while loop,
tanweer 2-Oct-13 3:14am View
will you please elaborate your question?
tanweer 2-Oct-13 3:00am View
i have updated my answer, please check now
tanweer 2-Oct-13 2:52am View
add a gridview on your page, and give the datareader to its datasource.
tanweer 2-Oct-13 2:42am View
string[] lines = tempText.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);

i was supposing that you had saved the content from an editor pressing <enter> for each line end
tanweer 2-Oct-13 2:32am View
hi, try getting the element like this may solve your problem,
<pre lang="c#"> Dim thiselement As HtmlElement = WebBrowser1.Document.All.GetElementsByName("your element id here")</pre>
tanweer 2-Oct-13 2:08am View
yeah you can get the last 150 line in the for loop, try concatenating the result variable like:
result +=lines[i];
tanweer 27-Sep-13 8:27am View
please post your code here that load users
tanweer 24-Sep-13 6:49am View
good answer:)
tanweer 20-Sep-13 3:36am View
it seems your working environment is Windows form application, please clear it first
tanweer 3-Sep-13 11:03am View
excellent solutions
tanweer 6-Mar-13 23:39pm View
hi panchalpuja,
see this link, width RepeatDirection="Vertical", RepeatLayout="Table" and RepeatColumns="5" you can acive what you desire
tanweer 19-Dec-12 4:08am View
Reason for my vote of 5 \n excellent post
tanweer 27-Nov-12 8:14am View
you should have the database on the client machine as well
tanweer 19-Nov-12 7:45am View
if this solves your problem then please mark it as answer
tanweer 19-Nov-12 5:35am View
if this solves your issue please mark as answer
tanweer 19-Nov-12 4:58am View
add your ID as
<asp:LinkButton ID="Image1" runat="Server" CommandName="cmdView" CommandArgument="<%# Eval("YourID") %>" runat="server" />
tanweer 10-Oct-12 5:14am View
CheckForIllegalCrossThreadCalls = false;
in the Form constructor
tanweer 10-Oct-12 2:49am View
please see my answer, I updated it
tanweer 10-Oct-12 1:58am View
tanweer 10-Oct-12 1:51am View
I still unable to resolve it as what
are doing here? but one thing i notice that you should stop the timer after the function3 call where you are disabling the timer.
tanweer 10-Oct-12 1:45am View
mark as answer if it solves your problem
tanweer 10-Oct-12 0:57am View
please go to improve question and put your code here so that we can help you out, thanks
tanweer 9-Oct-12 2:19am View
please ellobarate your question little more
tanweer 9-Oct-12 2:15am View
you need to put your
// Some functions which take approx 15 to 30 minutes to execute.
inside the timer1_Tick before the Update(), because the button click event is fired only once and the tick event of Timer will be executing after every 100 milli sec.
tanweer 9-Oct-12 2:11am View
poor question.
tanweer 9-Oct-12 1:32am View
good answer, 5+
tanweer 5-Oct-12 4:57am View
put your code that bind the dropdownlist here, it will guide to resolve the issue
tanweer 4-Oct-12 7:12am View
i am working with 4.5 and Visual Studio 2012
tanweer 4-Oct-12 6:50am View
change location.href = "";
to'' ,'_blank');

for your 2nd requirement you should use 3rd party controls like telerik
tanweer 4-Oct-12 5:43am View
i tested it and it is redirecting to do you want to open it in a new tab or window???
tanweer 4-Oct-12 5:16am View
if your sumbit button is a server control then you can definitely write this code
tanweer 4-Oct-12 5:12am View
what is your issue? clear it. Are you getting any error?
tanweer 4-Oct-12 5:01am View
if you have constraint not to have any other controls like textbox then it is not possible in if you look at ajax toolkit combobox then there is an option to have autocomplete mode check here[^]
tanweer 2-Jul-12 2:07am View
Reason for my vote of 5
excellent post, my 5!
tanweer 29-Jun-12 1:42am View
not what my requirement is..
tanweer 29-Jun-12 1:41am View
I need two records in single row horizontally and then print another two records in the next row in same structure.
tanweer 29-Jun-12 1:35am View
thanks for the reply, but I need to show two Rows(from database) and show these two in a single Row of the Gridview..
tanweer 28-Jun-12 6:00am View
try putting a break point here and see what wrong is going
tanweer 28-Jun-12 5:10am View
did you check my answer? It is working as I tested it.
tanweer 28-Jun-12 3:57am View
No, the correct jQuery code is
var category=$('#hollywood').html();
tanweer 28-Jun-12 3:44am View
this will not work as the anchor tag has no val property
tanweer 15-Jun-12 3:57am View
fist of all you should declare the DataSet and OleDbDataAdapter globally as the connectionstring is.
the ist one is the code on page load and the edited code is comboBox1_SelectedIndexChanged. now you shoul resolve this issue
tanweer 15-Jun-12 2:56am View
tanweer 15-Jun-12 2:53am View
whats wrong with my this answer??
tanweer 15-Jun-12 1:24am View
good answer, 5!
tanweer 14-Jun-12 3:13am View
good answer, my 5!
tanweer 13-Jun-12 7:09am View
just replace the label name to your TextBox as
TextBox1.Text = DateTime.Now.ToString("MM dd yyyy hh:mm:ss.fff");
tanweer 13-Jun-12 7:08am View
if this solves your issue then please rate the answer and close this thread by accepting the answer.
tanweer 13-Jun-12 6:53am View
i will modify the answer, please look it again.
tanweer 13-Jun-12 6:06am View
try replacing
this.comboBox1.DataSource = ds;
this.comboBox1.DataSource = ds.Tables[0];
tanweer 13-Jun-12 5:10am View
hi, the DataSource property of GridView or ComboBox etc take a DataTable or DataSet. i am surprised why you have used DefaultViewManager here.
try using just
tanweer 13-Jun-12 1:53am View
good answer, my 5!
tanweer 13-Jun-12 1:53am View
you have used the datatype of the parameter SqlDbType.BigInt, check it in the procedure is it the same there??
tanweer 13-Jun-12 1:44am View
hi, remove comment from this line and test:
cmd.Parameters.Add("@ID", SqlDbType.BigInt).Value =Convert.ToInt32( txtID.Text);
tanweer 6-Jun-12 7:35am View
then the usage is...............???
tanweer 6-Jun-12 7:00am View
even you call a method that does not have any parameter with parameters what is the use of those parameters that are called??
tanweer 6-Jun-12 6:59am View
even you call a method that does not have any parameter with parameters what is the use of those parameters that are called??
tanweer 6-Jun-12 3:24am View
answer is NO. how you can get the parameter inside the function as it not taking any thing from out side.
tanweer 31-May-12 8:07am View
untill you don't post your block of code here nobody can help you
tanweer 31-May-12 6:36am View
in this particular case instead of using SqlDataReader use SqlDataAdapter like I have used in my solution. If you use SqlDataReader then you have to loop through SqlDataReader
tanweer 31-May-12 4:12am View
please correct this
idSQL = "SELECT * FROM Newtransaction where isDate "
idSQL = "SELECT * FROM Newtransaction where isDate ='SOME DATE'"
tanweer 31-May-12 2:58am View
check your Button ID generated by HTML source. Is it same as it is out side the datalist?? if it is changed inside datalist then use this ID in your Jquery code.....
tanweer 31-May-12 2:53am View
question is are you using UpdatePanel on your Content page?
tanweer 31-May-12 1:41am View
if you still want to use UpdatePanel then try like in this
tanweer 31-May-12 1:39am View
it seems that your upload control is inside a UpdatePanel.
You cannot upload files using AJAX => you should not be placing a FileUpload control inside an UpdatePanel because this UpdatePanel sends an AJAX request to the server.
tanweer 31-May-12 1:34am View
you dont need to call it, it will automatically call the method when the textbox leave event fires
tanweer 31-May-12 1:03am View
the question is about and your answer is referring a WinForm Application. please first clear the question and go for answer.
tanweer 31-May-12 0:53am View
hi, how it will validate a Date on textchange event even the date is not completely entered? are you asking on leave or blur event???
tanweer 30-May-12 7:24am View
if there is nothing on the serverside on the Button click event then please call the javascript like this.
function ChangeText(){
return false;

and the button will look like this:
<asp:Button ID="button1" runat="server" Text="Change Text" OnClientClick="return ChangeText();" />

this will call the javascript method but will not get a postback.
best of luck
tanweer 30-May-12 6:17am View
I have edited the below answer and it will definitly work and there is no doubt of error. please try now
tanweer 30-May-12 5:51am View
when you have all the HTML in this line of code
string html = wc.DownloadString(url);
then now you have to add your own logic to find LINKS,
an idea is to split the HTML with </a> then collect all anchor tags by adding some string operations using c# code.
tanweer 30-May-12 3:39am View
yes, to delete a file from the directory use code like:
bool DeleteFile(string file_name)
// Try to delete the file.
return true;
catch (IOException)
// We couldn't delete the file.
return false;
tanweer 30-May-12 3:21am View
hey dear sunandandutt, Label does not has val property, it has only html() property, please correct your answer
tanweer 29-May-12 2:49am View
if you are using Script Manage on your page then the above answer will work other wise you need to add this one
Page.ClientScript.RegisterStartupScript(this.GetType(), "CallJS", "JSFunctionName();", true);
tanweer 17-May-12 7:25am View
using jQuery KeyDown it will be possible
tanweer 15-May-12 8:28am View
I just updated the answer, please look again,
tanweer 14-May-12 7:49am View
sorry we are away from JAVA!!!!!!!!
tanweer 14-May-12 7:22am View
what is your question? what do you want to do?
tanweer 14-May-12 1:50am View
post your block of code where you stuck
tanweer 14-May-12 1:41am View
hi, this is not quite simple as you think, you are going to develop a Content Management System. You need to work hard to do this, storing the page content into database and retrieve them when they need to show. add a html editor for the user to input the article content and save to db with some check to approve.
tanweer 11-May-12 7:55am View
as I said early that your stored link should be relative, it should look like ~/pdf/test.pdf.
tanweer 11-May-12 6:52am View
i have just edited the code please replace it again
tanweer 11-May-12 6:51am View
Are you talking about Win Form or its web application?
tanweer 10-May-12 4:46am View
Is it possible to download 6 jquery script to your local computer and reference them from your program instead of giving online reference?
This way it does not depend on the internet speed.
tanweer 4-May-12 8:28am View
i am glad that it help you
tanweer 4-May-12 7:37am View
tanweer 4-May-12 7:36am View
tanweer 4-May-12 5:19am View
you are right..
tanweer 4-May-12 1:10am View
I have edited the above answer with adding join
tanweer 4-May-12 0:53am View
please post your code block where you are binding the GridView so that we can give you any suitable solution.
tanweer 2-May-12 5:14am View
ok then download and add this file in your own application and try
tanweer 2-May-12 4:47am View
it depend on how you added CheckBoxes to your Form, did you add CheckBoxList or all these are checkbox control?
tanweer 30-Apr-12 8:22am View
hi, when you bind your DropDownlist add this line of code
YourDropDownlist.Attributes.Add("Title", "your db data count");
tanweer 26-Apr-12 2:31am View
and Do not write in bold, its means you are screaming
tanweer 26-Apr-12 2:28am View
Hi, just add AutoGenerateColumns="True" in the Grid view.
I can see it is missing there....
tanweer 20-Apr-12 7:31am View
hi, Replace your Link Button html with this one:
<asp:LinkButton ID="lnkSelect" runat="server" CommandName="Select" OnClientClick = "return plzwait();">Download
tanweer 11-Apr-12 0:32am View
you don't need to add OnClientClick here.
tanweer 10-Apr-12 9:01am View
if you are using the dive in code behind then its OK leave the Runat=server.
if you are using mster page then server control ID will be changed and btnAssignJudToCourse is no more access in the javascript, so you need to get its actual ID generated. Right click on the page--go to View Page Source and look you IDs for Button, Hidden Field and the Div. its will be Looks like ContentBody_btnAssignJudToCourse or ctl00_ContentBody_btnAssignJudToCourse, this should be get your self and use this ID (from the page source) in the jquery.
tanweer 9-Apr-12 6:24am View
no no, you just need to past the above code in your Head section
tanweer 8-Apr-12 6:56am View
put your exception text here if there occurs error otherwise put a break point on this line
gh1.DataSource = dsShow1;
and select dsShow1 and right click on it --go to Quick Watch and see the table data. It seems your query does not return any result.
tanweer 8-Apr-12 6:38am View
hi, I am surprized why you put the check for not post back on the button click? remove it and test like:
protected void Button1_Click(object sender, EventArgs e)
tanweer 6-Apr-12 8:30am View
I got the names by using item.Key & item.Value
tanweer 6-Apr-12 7:37am View
thanks for the post, can I listdown all fields when pdfReader reads the file in an array or some other way here??
tanweer 4-Apr-12 6:58am View
hi, its very simple. Use a Div with display none and put your Picture or Text inside it and on Button click use JQuery toggle function to show or hide it.
tanweer 21-Mar-12 2:14am View
thanks, these are bitCount, width and height
tanweer 15-Mar-12 1:14am View
yes I tested it in Chrome and I am using Visual Studio 2010.(framwork 4)
tanweer 12-Mar-12 1:46am View
I am surprised that why are you using LINQ as you want to work without LINQ-to-SQL class template?? Just use ADO.Net or Entity Framework.
tanweer 5-Mar-12 3:45am View
Thanks a lot for the help, when I tried the above code I am stuck with the newPoint. I set oldPoint to the position where I just clicked, what will be the newPoint when I am moving the mouse?
tanweer 5-Mar-12 3:00am View
hi SAKryukov, my requirement is to load a snapshot of a google map and then select a desired area from this image.
I dont think custom control will solve my problem.
tanweer 17-Feb-12 4:16am View
ok, then your ajax call should looks like:

type: "POST",
contentType: "application/json; charset=utf-8",
url: 'widgetJosn.asmx/PerformSearch',
data: "{'strInput':'"+strInput+"'}",
dataType: "JSON",
success: parseData,
error: AjaxFailed
tanweer 9-Feb-12 0:49am View
I can see that you are going to insert in more than one tables. if so then its easy just modify the above method Like after the first for loop start another for loop that will be like:

commandSql.CommandText = "INSERT INTO 2nd Table (column Name) VALUES (@perameter1)";
for (int i= 0; i< istDropDownName.Items.Count; i++)
commandSql.Parameters["perameter1"].Value = istDropDownName.Items[i].SelectedItem.Text;

and then start another loop like

commandSql.CommandText = "INSERT INTO 3rd Table (column Name) VALUES (@perameter2)";
for (int j= 0; j< SecDropDownName.Items.Count; j++)
commandSql.Parameters["perameter2"].Value = SecDropDownName.Items[j].SelectedItem.Text;
tanweer 9-Feb-12 0:42am View
I can see that you are going to insert in more than one tables. if so then its easy just modify the above method Like after the first for loop start another for loop that will be like:
for (int i= 0; i< istDropDownName.Items.Count; i++)
//do same as for the employee insertion

and then start another loop like
for (int j= 0; j< SecDropDownName.Items.Count; j++)
//do same logic as for the employee insertion
tanweer 9-Feb-12 0:29am View
are you sure that there are same no of data in both the ListBox and DropDownList??
tanweer 17-Jan-12 4:22am View
actually I want to hide the image after downloading the file successfully.
tanweer 16-Jan-12 5:27am View
Thanks for the great reply.
tanweer 28-Dec-11 0:15am View
Thanks for reply.
I am hiding these divs on another div's click event as

$(document).ready(function () {

$('#MainDiv').click(function () {
tanweer 13-Dec-11 6:01am View
this is happen when there is master page associated with it. please right click the page and open the source html and see the control ID there, copy it and replace CheckBoxList1 and txtAllergyName in the above script
tanweer 13-Dec-11 5:09am View
what are you going to do in common.cs class in App_Code with the TextBox value??
tanweer 2-Aug-11 2:10am View
thank you SanjeevSingh for your reply.
I don't know how to use the timer here I need just to refresh the usercontrol when I click a button from javascript, that is all my requirement.
tanweer 16-Jun-11 12:06pm View
hi Alizee@CP,
I did not see any requirement to show inside your DIV in your question, please let me know what should display in your div? If you want to Dynamically create ASP Text Boxes then it will be little difficult so you may use <input type='text'> as it can be created easily and can get its value in javascript latter.
tanweer 16-Jun-11 6:12am View
I also notice that the if statement is not good, use

if($(this).val() != "") instead of if(this.val() != "")
tanweer 16-Jun-11 6:09am View
hi, try putting an alert inside your blur event to check either this event is firing or not.
tanweer 6-Jun-11 4:05am View
Hi, I have added a link in the solution please refer to it and create a site in IIS.
tanweer 4-May-11 8:24am View
welcome to codeproject
if you are new to then I will suggest you as your senior that you first try to search it over internet as you can this will improve you knowledge.

visit here to get solution for your requirement.
tanweer 20-Apr-11 3:39am View
Thank you very much for your reply. I don't think this is a tag closing problem here when I paste the html that was not encoded so an extra DIV was added there mistakenly.
My exact html is:
<form id="form1" runat="server">
<div id="DVloading" style="display:none;">
<img src="../Images/circular.gif" width="20" height="23" />
<div id="xxxDiv">
tanweer 6-Jan-11 6:40am View
Thanks for the reply,

I got a user_key and a App_Key from the given link and now I am unable to apply these codes in my file to post my messages to different social sites.
can you please explain me the method??

tanweer 2-Oct-10 4:35am View
Thanks lot for ur reply,

Yes I need it for a web browser control placed in my Windows application