Click here to Skip to main content
15,400,312 members

Comments by Mohd. Mukhtar (Top 164 by date)

Mohd. Mukhtar 19-Jan-14 1:46am View
It will be on web, social and mobile.
Mohd. Mukhtar 12-Jun-13 5:15am View
Reason for my vote of 4 \n good
Mohd. Mukhtar 24-Jan-13 1:35am View
Don't put your comment as solution.
Mohd. Mukhtar 21-Jan-13 4:55am View
What have you tried so for?
Mohd. Mukhtar 18-Jan-13 5:55am View
Try the above code now. I missed the single quote in previous post.
Mohd. Mukhtar 18-Jan-13 5:52am View
What have you tried? Copy your code here? And web.config file is for configuration of application we should use this file for storing / declaring application level value.
Mohd. Mukhtar 18-Jan-13 5:00am View
What error are you getting?
Mohd. Mukhtar 17-Jan-13 6:14am View
What have you tried?
Mohd. Mukhtar 17-Jan-13 3:52am View
This will work for single customer, But I need to fetch multiple customer data WITH IN clause.
Mohd. Mukhtar 17-Jan-13 3:50am View
If you have any question or concern, Please use have a question on comment button.
Mohd. Mukhtar 17-Jan-13 3:49am View
Thanks TR, It is working fine. +5
Mohd. Mukhtar 17-Jan-13 3:35am View
What have you tried so for? Please copy some code snippet here.
Mohd. Mukhtar 10-Jan-13 3:16am View
For that you need to run your Visual Studio in Debug mode.
Mohd. Mukhtar 10-Jan-13 2:31am View
What have you tried so for?
Mohd. Mukhtar 27-Dec-12 5:23am View
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">

Remove the "ChildrenAsTriggers="False" " from the above line and check.
Mohd. Mukhtar 26-Dec-12 4:44am View
What have you tried?
Mohd. Mukhtar 26-Dec-12 1:33am View
What have you tried so for??
Mohd. Mukhtar 21-Dec-12 7:38am View
Please provide your code here.
Mohd. Mukhtar 20-Dec-12 7:12am View
Not clear??
Please specify more about the question.
Mohd. Mukhtar 4-Dec-12 1:52am View
What project you want????
Mohd. Mukhtar 4-Dec-12 1:50am View
First deploy your application on port 1049. And on the server check with the below URL and see the result.

Mohd. Mukhtar 4-Dec-12 1:41am View
I am not sure how it happen, I was just improving the solution But it got submitted as new solution.

Anyways Thanks :-)
Mohd. Mukhtar 3-Dec-12 2:53am View
if id into Database is integer type then you dont need single quote here. Remove the single quote and execute.
Mohd. Mukhtar 3-Dec-12 1:21am View

Update your code as below.

protected void ddlDisplayName_SelectedIndexChanged(object sender, EventArgs e)
AdminActivityBL ObjAdminActivity = new AdminActivityBL();
string selectedValue = ddlDisplayName.SelectedItem.Value;
DataSet ds = ObjAdminActivity.GetDisplayNamesDetails(selectedValue);
//Bind ds with gridview or listview to display result on front end.

Mohd. Mukhtar 30-Nov-12 6:40am View
This error is coming from some other file.

Place a debug point and debug the code line by line.
Mohd. Mukhtar 30-Nov-12 3:49am View
yeah sure,
Mohd. Mukhtar 29-Nov-12 4:40am View
Write your code like below.

public void button_Click(object sender, EventArg e)
string ddlValue = dropDownList.SelectedItem.Value;
//fill all the record.
//Save the record into DB

Refer the below link.
Mohd. Mukhtar 29-Nov-12 4:29am View
What value are you setting from comboBox1 .Text as I am not able to see any variable.

Comment the below line in your code
Qcommand.Parameters.AddWithValue("@type", comboBox1 .Text ); and then try. and let me know what result you are getting from database.
Mohd. Mukhtar 29-Nov-12 2:27am View
I think you are using windows form. So try with
dataGridView1.Grid.DataSource= select(u);
Mohd. Mukhtar 29-Nov-12 1:17am View

me fine, What abt you?

BTW this is not a place for chatting ;-)
Mohd. Mukhtar 28-Nov-12 10:34am View
Cool :-)
Mohd. Mukhtar 28-Nov-12 9:42am View
Welcome :)
Mohd. Mukhtar 28-Nov-12 6:58am View
Is there any relation between two table?
Mohd. Mukhtar 28-Nov-12 6:57am View
What kind of number you want to generate?

Is it random number or
You want to generate number for primary key column to store in DB.
Mohd. Mukhtar 28-Nov-12 6:53am View
If you are fetching the data form database as per the selected value of dropdown then write your code something like below.

protected void ddlLobGrpId_SelectedIndexChanged(object sender, EventArgs e) {
string selectedValue = ddlLobGrpId.SelectedItem.Value;
DataSet ds = GetDataFromDB(selectedValue);

public DataSet GetDataFromDB(string selectedValue)
//write your code here to execute SP and return the result
But still I am not sure what really you want to do into above method.
Mohd. Mukhtar 28-Nov-12 6:02am View
We can not write code here as we don't know functionality, and what do you want to perform here.
Mohd. Mukhtar 28-Nov-12 5:27am View
In code behind file.

write the code in Page_Load method with as below.

if(!IsPostback) //This will make sure that only once the below code will be executed.
ddlName.DataSource = GetItems();
Mohd. Mukhtar 28-Nov-12 4:43am View
Yes correct. For this you are using FindByText, And this will fetch only those item which is avail into the array item, So it will just select that item.
Mohd. Mukhtar 28-Nov-12 3:36am View
string[] items = paramEmpLanguageInfo.LanguageName.Split(','); for (int i = 0; i <= items.Length; i++)
ListItem currentCheckBox= cklLanguage.Items.FindByText(items[i].ToString())
if (currentCheckBox != null)
{ currentCheckBox.Selected = true; } }
Mohd. Mukhtar 28-Nov-12 3:24am View
what have you tried?
Mohd. Mukhtar 28-Nov-12 3:21am View
It is because empLanguage is char string and hence you can not convert it into integer.
Mohd. Mukhtar 28-Nov-12 3:06am View
see updated answer.
Mohd. Mukhtar 28-Nov-12 3:02am View
Apply the below code.

for(int i=0; i
Mohd. Mukhtar 28-Nov-12 2:56am View
Apply the below code.

for(int i=0; i
Mohd. Mukhtar 28-Nov-12 2:45am View
Mohd. Mukhtar 28-Nov-12 2:17am View
Write below code in your aspx page.

<asp:CheckBoxList ID="lstCheckBox" runat="server" DataTextField='<%# Eval("LanguageName") %>' DataValueField=<%# Eval("LanguageId"%>'>

And Then bind the value with below code.

lstCheckBox.DataSource = queryResult; //query result should be dataset or datatable.
Mohd. Mukhtar 28-Nov-12 2:03am View
In this case you need to execute select command on language table.

SELECT languageId, languageName FROM tblLanguage;

Then bind the result with checkboxlist.
Mohd. Mukhtar 28-Nov-12 1:50am View
What error you are getting here?
Mohd. Mukhtar 28-Nov-12 1:45am View
If you want to repopulate then you need to split the language with "," separator and after that you can bind checkbox.
Mohd. Mukhtar 28-Nov-12 1:43am View
Welcome :-)
Mohd. Mukhtar 28-Nov-12 1:03am View
What have you tried?
Mohd. Mukhtar 28-Nov-12 0:57am View
Yeah sure please have a look above query and try to run.
Mohd. Mukhtar 28-Nov-12 0:29am View
What have you tried?
Mohd. Mukhtar 28-Nov-12 0:28am View
Try after updating below line.

Report.PrintToPrinter(1, false, 0, 0);
Mohd. Mukhtar 27-Nov-12 5:56am View
try to save with Server.MapPath
Mohd. Mukhtar 27-Nov-12 5:45am View
What have you tried to do the same?
Mohd. Mukhtar 27-Nov-12 4:29am View

You can use below links for the shortcut for VS.,-2010,-2011,-2012-Keyboard-Shortcuts-Keys.html

And if you want to know number of line in particular file go to end of the line and put the cursor at the end of line. You can see the total line of code in that file into the footer line of VS.
Mohd. Mukhtar 27-Nov-12 2:15am View
Is connection opening or not, copy-past your error stack here.
Mohd. Mukhtar 27-Nov-12 1:15am View
What have you tried??
Mohd. Mukhtar 26-Nov-12 5:20am View
What data base you are using?
Mohd. Mukhtar 26-Nov-12 4:45am View
What have you tried?
Mohd. Mukhtar 26-Nov-12 2:23am View
Please refer the below links. Hope this will help you.
Mohd. Mukhtar 26-Nov-12 2:22am View
Please refer the below links.
Hope this will help you.
Mohd. Mukhtar 26-Nov-12 1:57am View
What you want to do??
Mohd. Mukhtar 24-Nov-12 2:03am View
This is full program
Mohd. Mukhtar 24-Nov-12 2:02am View
See the updated answer.
Mohd. Mukhtar 24-Nov-12 1:35am View
Mohd. Mukhtar 24-Nov-12 1:15am View
Thank you :)
Mohd. Mukhtar 23-Nov-12 23:51pm View
On which line you are getting error.
Mohd. Mukhtar 23-Nov-12 5:15am View
Then you need to integrate .net profiler and the result you can display or write in some file.
Mohd. Mukhtar 23-Nov-12 4:39am View
On Button Search click you need to find the all value of the page. You can not get row of the grid in this fashion.
Mohd. Mukhtar 23-Nov-12 4:33am View
On which line you are getting error?
Mohd. Mukhtar 23-Nov-12 4:20am View
What do you want to perform?
Mohd. Mukhtar 23-Nov-12 4:15am View
If you enable trace it will show all the event and called method.
Enable trace and see the result
Mohd. Mukhtar 23-Nov-12 3:25am View
What have you tried?
Mohd. Mukhtar 23-Nov-12 1:52am View
Please explane what you want to do?
Mohd. Mukhtar 23-Nov-12 1:49am View
yes correct, But if you change your setting then it will directly deduct your point without any history.
Mohd. Mukhtar 23-Nov-12 1:47am View
What have you tried??
Mohd. Mukhtar 22-Nov-12 23:31pm View
If it resolve your problem then mark this as your answer.
Mohd. Mukhtar 22-Nov-12 6:21am View
Good :-)
Mohd. Mukhtar 22-Nov-12 6:13am View
what have you tried?
Mohd. Mukhtar 22-Nov-12 6:03am View
1. insted of Convert.ToString(GridView1.DataKeys[e.RowIndex].Values["Property_ID"]);
you can use bound field to get Property_ID
2. add using System.Data
3.foreach (ListItem li in chkb.Items)
Mohd. Mukhtar 22-Nov-12 5:39am View
On which line are you getting error?
Mohd. Mukhtar 22-Nov-12 5:38am View
What error you are getting here?
Mohd. Mukhtar 22-Nov-12 4:17am View
See the below answer.
Mohd. Mukhtar 22-Nov-12 4:03am View
hmmm Ok.

Mohd. Mukhtar 22-Nov-12 3:33am View
Raj you should try below code.
in place of CheckBoxList Ame = (CheckBoxList)GridView1.Rows[e.RowIndex].FindControl("chklamenities");
string ame = Convert.ToString(Ame.SelectedItem

you need to try
CheckBoxList Ame = (CheckBoxList)GridView1.Rows[e.RowIndex].FindControl("chklamenities");
string ame="";
foreach (ListItem li in chkame.Items)
ame += li.Text + ",";

ame = ame.TrimEnd(",");
Mohd. Mukhtar 22-Nov-12 3:25am View
what have you tried?
Mohd. Mukhtar 22-Nov-12 3:23am View
Mohd. Mukhtar 22-Nov-12 3:21am View
Please update full methos where you are have written update query.
string strQ = "update tbl_Post_Property set Amenities='" + ame + "' where Property_ID='" + Property_ID + "'";
Mohd. Mukhtar 22-Nov-12 3:17am View
Then mark it as answer ;-)
Mohd. Mukhtar 22-Nov-12 2:22am View
string s3 = s + s2;
Mohd. Mukhtar 22-Nov-12 2:18am View
Could you please copy your full grid view code by improve question option?
Mohd. Mukhtar 22-Nov-12 2:10am View
What have you tried?
Copy your code here by clicking improve question.
Mohd. Mukhtar 22-Nov-12 1:46am View
It should be user ID but the hidden field should be in gridview. And when you bind the gridview each rows data will have associated userid.
Mohd. Mukhtar 22-Nov-12 1:38am View
This is because you are using same user id for each row. Which you are taking form hidden field, Put this hidden field as well into gridview and then check.
Mohd. Mukhtar 22-Nov-12 1:03am View
What have you tried so for???
Mohd. Mukhtar 21-Nov-12 7:05am View
Mohd. Mukhtar 21-Nov-12 7:05am View
Mohd. Mukhtar 21-Nov-12 6:39am View
try to use refresh or update of gridview control.
Mohd. Mukhtar 21-Nov-12 6:17am View
What have you tried so for??
Mohd. Mukhtar 21-Nov-12 5:50am View
What have you tried.
Mohd. Mukhtar 21-Nov-12 4:29am View
if you want to keep all the values from the data base then you only need to put below line into clearForm Method
ddlCity.SelectedIndex= 0;
ddlBranch.SelectedIndex= 0;
Mohd. Mukhtar 21-Nov-12 2:45am View
Cool, So finally your issue has been resolved.
Mohd. Mukhtar 20-Nov-12 6:58am View
This should work When you change the mode to release.
Mohd. Mukhtar 20-Nov-12 6:19am View
Actually you are hiding the dropdown in page load. If you do so either it will hide all or hide none. Remove those line of code from page load and then check.
Mohd. Mukhtar 20-Nov-12 6:02am View
Sorry the above event method I have posted for the GridView. In that case you can do it in databound method itself.
Mohd. Mukhtar 20-Nov-12 3:25am View
Hi Mani,

Since there is only few records, that does'nt make any performance difference.
Mohd. Mukhtar 19-Nov-12 6:02am View
What have you tried??
Mohd. Mukhtar 19-Nov-12 2:13am View
plese see the updated code.
Mohd. Mukhtar 19-Nov-12 1:59am View
In that case you need to update the the order by coustomising.
Mohd. Mukhtar 16-Nov-12 6:25am View
what have you tried?
Mohd. Mukhtar 16-Nov-12 3:59am View
Please copy your code here.
Mohd. Mukhtar 16-Nov-12 3:46am View
MyListBox is your listbox name please verify once again. May be you are getting this error because of incorrect name.
Mohd. Mukhtar 16-Nov-12 2:18am View
the best way is to store into XML. Because reading and storing data into XML is easy and efficient. I have update some link to work with XML.
Mohd. Mukhtar 16-Nov-12 2:15am View
please see the above updated answer
Mohd. Mukhtar 16-Nov-12 1:56am View
Can you please update your code snippet here?
Mohd. Mukhtar 15-Nov-12 7:19am View
yes Adil,

Please note that SqlCommand.ExecuteNonQuery() method returns the number of row affected by the insert, delete or update command.
Hence here we have declared int result to store the no of affected rows. It will have the value >0 if command executed successfully other wise it will have negative value.
Mohd. Mukhtar 15-Nov-12 5:19am View
you need to debug the code line by line. And copy the exact error what you are getting while sending email.
Mohd. Mukhtar 15-Nov-12 4:46am View
Please avoid using these many try catch blocks.
Mohd. Mukhtar 15-Nov-12 2:53am View
This error can be because you have used DivBtnImgCopy more then once into same aspx page.
Mohd. Mukhtar 14-Nov-12 5:32am View
see the updated ans and refer given links for more details.
Mohd. Mukhtar 12-Nov-12 6:35am View
you can get this value from the combobox as below.
string selectedValue = comboBox1.SelectedItem.ToString();

But you can not convert it directly into integer.
Mohd. Mukhtar 12-Nov-12 6:17am View
here your combobox value is in the form of 1-5 6-10 11-20 so for this you need to add this value into an string.

and then split that value in string and then you can convert that value into integer.
Mohd. Mukhtar 12-Nov-12 6:02am View
use int selcetedComboValue = Int32.Parse(comboBox1.SelectedItem.Value.ToString());
Mohd. Mukhtar 12-Nov-12 2:21am View
Same you can check into button click event method and validate accordingly.

If you are still not able to solve, Please put some code snippet.
Mohd. Mukhtar 7-Nov-12 6:16am View
see the updated answer
Mohd. Mukhtar 7-Nov-12 2:33am View
what have you tried?
Mohd. Mukhtar 19-Oct-12 8:04am View
No Problem
Mohd. Mukhtar 16-Oct-12 8:20am View
Pls follow the below link.

and modify the request and attribute which you want in response object.
Mohd. Mukhtar 16-Oct-12 7:46am View
Then you need to modify the SendRequest method and in return object you need to add required value.
Mohd. Mukhtar 16-Oct-12 5:31am View
print the attributes and values of response object, Hope you will figureout the thing now.
Mohd. Mukhtar 16-Oct-12 5:01am View
In the below line what value you are getting in response object.

SearchResponse response = (SearchResponse)connection.SendRequest(request);
Mohd. Mukhtar 16-Oct-12 3:49am View
Coustmize response and return flag value and check flag value if user has access to change password or not.
Mohd. Mukhtar 16-Oct-12 2:39am View
please update some code snipet how are you checking the user and where you have stored the information regarding the change password status.
Mohd. Mukhtar 12-Oct-12 3:37am View
Thanks :-)
Mohd. Mukhtar 12-Oct-12 3:28am View
In your case you should use session variable only, because you want to use data in multiple pages. If you use query string you need to pass data again and again in other pages and unnecessry code you need to write the other reason is query string is insecure to use.
Mohd. Mukhtar 12-Oct-12 2:20am View
Could you please paste your html code of gridview?
Mohd. Mukhtar 10-Oct-12 5:56am View
Any error you gettting here.
Mohd. Mukhtar 10-Oct-12 5:01am View
Could you please copy your code how you handling error.
Mohd. Mukhtar 9-Oct-12 5:52am View
you need to write a function with reqex to do like statement task.
Mohd. Mukhtar 9-Oct-12 5:50am View
How are you accessing server application into your system?
Mohd. Mukhtar 8-Oct-12 5:26am View
use the below query

var userGrouping =
from c in dbs.UserGroupings
select new{c.*give the column name here.};
//Bind combobox after the making the list as below.
Mohd. Mukhtar 8-Oct-12 5:23am View
Are you want to update primary key value?
Mohd. Mukhtar 8-Oct-12 5:01am View
For this you need to bind CommandName value in HTML.
For more assistant you should copy your gridview HTML code here.
Mohd. Mukhtar 5-Oct-12 4:05am View
See the below ans. That might help you.
Mohd. Mukhtar 5-Oct-12 1:42am View
Are you want to read event viewer log?
Mohd. Mukhtar 4-Oct-12 7:23am View
Please elaborate what you want to create.
Mohd. Mukhtar 4-Oct-12 7:20am View
Can you please check html code in the brwser which is generating after page load.

And check the menu item html what code has been added into that.
Mohd. Mukhtar 4-Oct-12 6:58am View
MenuItem menu = new MenuItem(Item1, "", "", navigationURL + this.Page.Request.Url.Query.ToString());
//Add event and property here in menu


The below link may help you more.
Mohd. Mukhtar 4-Oct-12 6:40am View
int loc = str1.IndexOf(TextBox1.Text);

in this line we are checking that any occurance of that Textbox1 is avail into the rich text or not.

if loc will give positive result then we replace those text in else block.
Mohd. Mukhtar 4-Oct-12 6:14am View
What error you getting??
Mohd. Mukhtar 4-Oct-12 6:10am View
you are most welcome!!!!
Mohd. Mukhtar 4-Oct-12 5:02am View
Could you please post the code from where you calling ReplaceFirstOccurrance method?
Mohd. Mukhtar 4-Oct-12 2:32am View
Are you getting any error while running without breakpoint?
Mohd. Mukhtar 3-Oct-12 7:48am View
Thanks :-)
Mohd. Mukhtar 3-Oct-12 6:12am View
you should create a WCF application and need to expose that service. In WCF you can coustmize header and data part separatly.
Mohd. Mukhtar 3-Oct-12 4:05am View
put break point and check if anything is coming in ds.Tables[0];
Mohd. Mukhtar 3-Oct-12 3:16am View
What error exactly you are getting??
Mohd. Mukhtar 3-Oct-12 1:59am View
look into this link
Mohd. Mukhtar 3-Oct-12 1:40am View
Please check first if the connection to database is opening or not.
First open connection with below line
and then check the connection state with below code.
if (con.State == ConnectionState.Open)
//execute the other code
//through error
//Or open connection again here

Mohd. Mukhtar 1-Oct-12 8:30am View
I think the Database name you are providing here is incorrect.
Please recheck the database name in the connection string and provide the correct databse name.

As per the error in your database HRIS_Employee database does not exist.
Mohd. Mukhtar 1-Oct-12 5:52am View
Put your code block into the try-catch block and check the stack trace to get the exact error.
Please let me know if you are not able to resolve the issue.