Click here to Skip to main content
15,176,561 members

Comments by Rockstar_ (Top 200 by date)

Rockstar_ 22-May-15 9:21am View
Hi Pradeep, this is not working. var GenderText = "Male";
if(item.Gender == 2){GenderText = "Female"} code is giving error.
Rockstar_ 30-May-14 1:24am View
my 5!
Rockstar_ 10-Mar-14 7:29am View
What about for postbacks?
Rockstar_ 10-Mar-14 7:09am View
Here the session type can be "doc" or "patient".
when the session is expired. How can we check for whether it is "doc" or "patient".
Rockstar_ 10-Mar-14 6:19am View
But the this onPrerender executes after the content page load know?
Rockstar_ 10-Mar-14 4:36am View
Please elaborate the problem clearly.
Rockstar_ 10-Mar-14 4:35am View
Adding in master page is enough.
Rockstar_ 7-Feb-14 6:39am View
What are Mouse1, Mouse2 etc...?
Rockstar_ 7-Feb-14 5:42am View
i think u want to refresh only a part of the page
if yes, using UpdatePanel u can do this...
Rockstar_ 3-Feb-14 0:28am View
seems you need to insert data to database.
Rockstar_ 3-Feb-14 0:27am View
What have you tried?
Rockstar_ 22-Jan-14 1:22am View
May b u r storing the drop down values in other table right?
U need to join another table where ur drop down text and values are stored.
Rockstar_ 22-Jan-14 0:38am View
Peter Leow it worked for me..
Thank you very much..
made small changes everything else fine..
Rockstar_ 17-Jan-14 6:31am View
Seems no but it is...
Rockstar_ 17-Jan-14 6:22am View
yes my 5!
Rockstar_ 17-Jan-14 6:17am View
Try by clearing the temp folders and cache of browser, because the browser caches the files like css and js, and if we modify any css or js files we get the above error. This may help you but i'm not sure.
Rockstar_ 12-Dec-13 2:35am View
Once check with Indexing, i think you are looking for this..
Rockstar_ 29-Nov-13 0:34am View
I'm going to create a confirmation message box.
Rockstar_ 29-Nov-13 0:33am View
Hi Roy,
Please check my updated question..?
Please have a look at __doPostBack() method, I need to get the ID like that..
Rockstar_ 22-Nov-13 1:35am View
it should work...
Rockstar_ 21-Nov-13 5:21am View
namespace somename
public class General_function
public static object Get_Single_Value(string SQLQuery)
object SingleValue = null;
DbConnection cn = database_Object.GetConnection(database_Object.Provider);
DbCommand cmd = database_Object.GetCommand(database_Object.Provider);
if (cn.State == ConnectionState.Closed)
cn.ConnectionString = My.Settings.Trasns_DataConnectionString;
cmd.Connection = cn;
cmd.CommandText = SQLQuery;

SingleValue = cmd.ExecuteScalar;

return SingleValue;


Now import somename in the page where you want,
ex: using somename;
then access the method with class name.

General_function.Get_Single_Value(you Query);
Rockstar_ 21-Nov-13 5:07am View
Please add namespace for the above class and import the namespace to the page where you want to access, then classname.methodname() you call.
Rockstar_ 20-Nov-13 4:02am View
Not possible dear , you need to learn some what basic CSS.
Rockstar_ 20-Nov-13 4:00am View
Even i too don't know the solution for your problem ,but i can suggest you to store the filename,path in DB and actual file somewhere in the Drive.
Rockstar_ 18-Nov-13 4:58am View
Server side or client side checking?
If server side make autopostback true...!
Rockstar_ 18-Nov-13 2:21am View
Contains some text boxes,some drop downs,required field validators,Regular expressions and Cancel and Submit Buttons.
Rockstar_ 18-Nov-13 2:14am View
You can do it through string in session or in Database..
Rockstar_ 18-Nov-13 2:13am View
Where all the data is stroing?

Session or DB?
Rockstar_ 18-Nov-13 1:58am View
There are around 40 validation controls on the page, do i have to write all those control names to access?
Rockstar_ 18-Nov-13 1:44am View
It is better to create an excel file with the same fields as in sql table and then import the file with header and data. It works.
Rockstar_ 18-Nov-13 1:40am View
Try setting with the UpdatePanel's property UpdateMOde to Always
Rockstar_ 7-Nov-13 7:24am View
Getting this error,

Retrieving the COM class factory for component with CLSID {B933B20D-20F7-4CBC-A31E-4A2C2F197BE1} failed due to the following error: 80040154.
Rockstar_ 7-Nov-13 7:24am View
yes now i'm able to do all the steps. but still the problem persists.
Rockstar_ 7-Nov-13 6:33am View
From the above link, i'm not able to do the last step, can u please help me to solve this ..
Rockstar_ 24-Oct-13 1:29am View
The error is :

{"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}
Rockstar_ 11-Oct-13 7:36am View
Your question is not clear, can you please elaborate your problem?
Rockstar_ 26-Sep-13 2:31am View
If i go with cultureInfo, I think it will be based on the OS settings which we do while OS instllation, If the user has not changed his/her settings, then it will show the selected Country, right?, Because I've tested once with culture info it is showing United States.
Rockstar_ 26-Sep-13 2:28am View
Thank you very much dear..
Rockstar_ 24-Sep-13 23:43pm View
I tried but not solved..
Rockstar_ 12-Sep-13 3:20am View
I'm filling the details in a form and i want to display the message on the same page after save click button, so the above link, displays alert message for while loading the form first time also.
Rockstar_ 2-Aug-13 2:28am View
Reason for my vote of 5 \n Too good...
Rockstar_ 1-Aug-13 4:51am View
Thank you OriginalGriff..... Simple and very clear answer...
Rockstar_ 1-Aug-13 3:04am View
Rockstar_ 29-Jul-13 4:40am View
I have around 20 conditions like above if's, and in future how many we will add we don't know, so writing too many if's will decrease the performance, so that i want to write the same using CASE.
Rockstar_ 29-Jul-13 4:38am View
Hi Raja Sekhar, CREATE PROCEDURE GetData
@Input Nvarchar(40)
If @Input ='Country'
Select CountryNames From TableName
Else if @Input='State'
Select StateNames From TableName
Select Columns from Table


The same i want to achieve with CASE statements....
Rockstar_ 29-Jul-13 4:37am View
The same i want to achieve with case statements...
Rockstar_ 29-Jul-13 3:14am View
I want to write a SP like this

case 'country'
then select * from countrytable

case 'state'
then select * from statetable
Rockstar_ 29-Jul-13 2:51am View
I want to write multiple select querries, bcoz i have some querries which are joined with other tables.
Rockstar_ 29-Jul-13 2:44am View
if my code when i call store procedure i pass strings like 'Country' or 'State' then based on the string passed it should match the CASE in stored procedure then execute the select statement .
Rockstar_ 29-Jul-13 2:42am View
I mean, i'm working on a asp .net c# project, I want to create a master stored procedure for getting data for all controls like dropdownlists,listbox etc . So that in future if any bugs then it will be easy to locate the errors in a single stored procedures instead of creating store procedures for every master type.
Rockstar_ 29-Jul-13 2:39am View
suppose If i want to get the data from multiple tables then?
Rockstar_ 29-Jul-13 2:38am View
Hi Raj Sekhar u r correct..
Rockstar_ 29-Jul-13 2:36am View
Clear textboxes after submit
Rockstar_ 29-Jul-13 2:36am View
Create primary or unique columns in ur database
Rockstar_ 24-Jul-13 23:41pm View
When i put enableEventValidatation to false, then the button click event is firing ,but the ddl's selecteditem/index/value's are coming null.
Rockstar_ 24-Jul-13 23:40pm View
No special chars in the data
Rockstar_ 24-Jul-13 8:02am View
If i use this type of coding in real time ,is it ok?
Rockstar_ 24-Jul-13 8:00am View
k k
Rockstar_ 24-Jul-13 7:42am View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class JSON_DDLFillWithJSON : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)


[ScriptMethod(UseHttpGet = true)]
public static string GetCountryList()
Connection cnn = new Connection();
return cnn.Get_CountryList();

protected void btnClickMe_Click(object sender, EventArgs e)
var cname= ddlCountry.SelectedItem;
var cMid = ddlCountry.SelectedItem;

protected override void Render(HtmlTextWriter writer)
Rockstar_ 24-Jul-13 7:42am View
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DDLFillWithJSON.aspx.cs" Inherits="JSON_DDLFillWithJSON" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
<script src="../Scripts/jquery-2.0.2.js"></script>
<script type="text/javascript">

$(document).ready(function () {
// $('#ddlCountry').html();


function getCountryList() {

url: "DDLFillWithJSON.aspx/GetCountryList",
type: "GET",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: onSuccess,
error: geterror,
failure: function (response) { alert(response.d); },
async: false


function onSuccess(response) {
var myobject = eval(response.d);

function BuildList(msg) {
var select = '';
for (var i = 0; i < msg.length; i++) {
select += '<option value=' + msg[i].MId + '>' + msg[i].MasterName + '</option>' + ''
var newselect = select;
return false;

function geterror(xhr, ajaxOptions, thrownError) {
alert(xhr.status + '</br>' + xhr.responseText + '</br>' + thrownError);

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel runat="server" ID="upd" UpdateMode="Always">
<asp:DropDownList runat="server" ID="ddlCountry">

<asp:Button Text="Click Me" runat="server" ID="btnClickMe" OnClick="btnClickMe_Click" />

Rockstar_ 24-Jul-13 7:33am View
using this info , he/she can get the data?
Rockstar_ 24-Jul-13 7:32am View
is there any posiblity of cracking the code?
Rockstar_ 23-Jul-13 6:40am View
Which page Master or Content page?
Rockstar_ 23-Jul-13 6:39am View
Where is the solution?
Rockstar_ 23-Jul-13 6:37am View
Uncaught Error: Syntax error, unrecognized expression: #<%=btnCompare.ClientID%>
Rockstar_ 23-Jul-13 6:36am View
While debugging through Chrome browser getting error
Rockstar_ 17-Jul-13 4:43am View
MY problem is same like solution 3
Rockstar_ 17-Jul-13 4:43am View
Please go through solution 3
Rockstar_ 17-Jul-13 4:38am View
Your answer is exactly matching my problem..
Rockstar_ 17-Jul-13 4:38am View
Could you please send code samples?
Rockstar_ 17-Jul-13 3:24am View
here in the above link rahul explained the process, but still have some doubts, like server side how to use the salt.
Rockstar_ 17-Jul-13 3:23am View
ya i'm comparing the two hash passwords only, but not matching..
Please look at this link
Rockstar_ 17-Jul-13 0:28am View
Thanks, it worked..
Rockstar_ 16-Jul-13 0:39am View
I want to do this with JQuery..
Rockstar_ 16-Jul-13 0:10am View
I'm finding by ID
Rockstar_ 16-Jul-13 0:10am View
please check once my updated questions and code..
Rockstar_ 12-Jul-13 0:07am View
The Additional information message clearlry states that the file can't find. check the path properly..
Rockstar_ 12-Jul-13 0:03am View
Try to set width of the gridview from code behind...
Rockstar_ 11-Jul-13 23:55pm View
Try with "uid" instead of "user id"
Rockstar_ 28-Jun-13 5:03am View
Thanks it worked fine..
Rockstar_ 28-Jun-13 0:17am View
Thank you very much...for suggesting me...
Rockstar_ 27-Jun-13 1:13am View
blur event is working fine, i need solution for appending the title of txtpwd2 multiple times tothe div d2.
Rockstar_ 25-Jun-13 3:00am View
Hi prasad. Do you have answers to the following questions..
Rockstar_ 24-Jun-13 9:17am View
and if we have 10 controls like in the above example, then we need to write the same way 10 times. Then here the design and logic will be mixed again like in classic ASP..?
Rockstar_ 24-Jun-13 9:13am View
i have a doubt, is this approach is good? bcoz here we are showing our method name, arguments and the types of arguments ans so on. if the user see the page source he can see all the logic,method name etc.
Rockstar_ 24-Jun-13 9:11am View
Hi dear... Thanks the url is working..
Rockstar_ 24-Jun-13 6:33am View
i know little bit of JQuery, like getting and setting the value to textboxes. i know we can call the ajax() method for getting the data, but i don't know what parameters ,how to pass the parameters and how to get the results.
Rockstar_ 24-Jun-13 3:27am View
What is the error?
Rockstar_ 21-Jun-13 4:51am View
Use Updatepanel to refresh only Gridview
Rockstar_ 21-Jun-13 2:05am View
There are some images in the image folder named like im1, im2, im3 etc..
Rockstar_ 20-Jun-13 23:40pm View
Yes i have taken the column as varchar, i have modified it to datetime and the problem solved...

Rockstar_ 18-Jun-13 7:43am View
i didn't get the searching criteria, could you plz explain clearly.?
Rockstar_ 18-Jun-13 7:40am View
My 5!
Rockstar_ 18-Jun-13 7:24am View
My 5!
Rockstar_ 18-Jun-13 7:23am View
For Chrome browser, it will save all the details like google search history, downlaoded files, searched text everything in sql lite database in C:/ drive.
Rockstar_ 18-Jun-13 7:22am View
Hi Mahmood, based on the browser and path set in the browser , then find that directory and you will get your answer..
Rockstar_ 11-Jun-13 5:49am View
If i write varchar(10), then it accepts special chars and alphabets also?
Rockstar_ 11-Jun-13 5:47am View
Rockstar_ 10-Jun-13 1:44am View
You are getting error at this line : int usrid = Convert.ToInt32(gvuserdetails1.DataKeys[gvrow.RowIndex].Value);

So check with break point each loop for the value of gvrow.RowIndex , may be getting error at last loop,try keeping int usrid = Convert.ToInt32(gvuserdetails1.DataKeys[gvrow.RowIndex-1].Value);
Rockstar_ 7-Jun-13 1:11am View
Please use english...
Rockstar_ 7-Jun-13 0:21am View
You mean ur textbox accepts only alphabets? if user enters numbers or special symbol then redirect to exceptionpage.aspx and display the error message? right..
Rockstar_ 6-Jun-13 3:20am View
Have u given update command in the design code of Gridview?
Rockstar_ 5-Jun-13 8:24am View
You can use AJAX's ModelPopUpExtender ...
Rockstar_ 5-Jun-13 8:14am View
Confusing, make it clear...?
Rockstar_ 5-Jun-13 7:38am View
You can use Timer control in asp .net
Rockstar_ 5-Jun-13 7:33am View
Do u know about cookies? Read from google...
Rockstar_ 5-Jun-13 7:16am View
What u want dear?
Rockstar_ 5-Jun-13 7:09am View
Build the models again and try...
Rockstar_ 5-Jun-13 5:45am View
not understood? describe...
Rockstar_ 5-Jun-13 5:44am View
Input type file? Plz describe?
Rockstar_ 5-Jun-13 5:18am View
No problem, The database will be stored in server having static IP address. They give in all applications database IP address, user name and password same.
Your problem solved...
Rockstar_ 5-Jun-13 5:16am View
If u have a static IP address then u can access ur database from remote.
Rockstar_ 5-Jun-13 5:15am View
Couls u plz describe the problem?
Rockstar_ 5-Jun-13 4:43am View
@Abhinav plz dont post multiple answers...
Rockstar_ 5-Jun-13 3:32am View
What you do is on enter key press event insert the value to array, like this accept all 25 values, and you will have all your 25 values in array. later you find the largest element in the array, after that print the array as a matrix using 2 for loops. If u don't know how to display in matrix then find some articles from net for dispalying an array in matrix, you will get lot of articles on that.
Rockstar_ 5-Jun-13 3:29am View
How are u entering the values in textbox?
Rockstar_ 5-Jun-13 3:26am View
Use if not exist keywords form sql and try to modify the sql querry, or before inserting the data first check with the columns which you are comparing, then based on the result , insert the data or give error message.
Rockstar_ 5-Jun-13 3:19am View
Do u get what u wanted?
Rockstar_ 5-Jun-13 3:18am View
User will enter only email ID or phone number or both?
Rockstar_ 5-Jun-13 3:03am View
call this javascript function on button's onclient click event.

function JSFunctionValidate()
document.getElementById('<%=ddlView.ClientID%>').selectedIndex =0

Rockstar_ 5-Jun-13 2:49am View
Soory dear, can't understand...
Rockstar_ 5-Jun-13 2:47am View
ok, after each textbox's leave event increase the value of progress bar...
Rockstar_ 5-Jun-13 2:13am View
Do u want to clear the drop down list? or u want to select the default one?
Rockstar_ 5-Jun-13 2:09am View
Ur question is not clear, plz elaborate?
Rockstar_ 5-Jun-13 1:39am View
You can put that radiobuttonlist in div and try apply width and height to div.
and overflow set to scroll.
Rockstar_ 5-Jun-13 1:26am View
You can do that, but that is not a proper way of handling the problem, if a new user want to add some other details then the data which already entered previously will be lost.
So that create a fixed column table then based on the user interest you store the values in a particular column. left column fill with Nulls of some default values.
Rockstar_ 5-Jun-13 1:22am View
I think you have a remote server and you want to upload the image from your local machine to server using Windows app right?
Rockstar_ 5-Jun-13 1:20am View
Plz put break points andlet me know the exact line of error..
Rockstar_ 4-Jun-13 8:15am View
You mean u want to find , whether the user is active or idle?
Rockstar_ 4-Jun-13 8:10am View
While adding exe file you have to add the database file also.
Rockstar_ 4-Jun-13 6:11am View
Please give full access to the folder which u r using for PDF files...
Rockstar_ 4-Jun-13 5:44am View
Windows or web application?
Rockstar_ 3-Jun-13 8:11am View
Write javacscript code to disable the radio button...

function somename()
var name=document.getelementByID('controlaname').value;

Rockstar_ 3-Jun-13 7:48am View
Please check once whether the database actually contains spaces...
Rockstar_ 3-Jun-13 7:35am View
Use formname.ShowDialog() method instead of Show()
Rockstar_ 3-Jun-13 7:32am View
read data from the word document and write it in sql server...
Rockstar_ 3-Jun-13 7:27am View
Clearly the error message is saying and describing the problem ...
Rockstar_ 3-Jun-13 7:14am View
Dear plz remove the selectedIndexchanged event totally
Rockstar_ 3-Jun-13 6:51am View
Now write the page index change code in this event and delete the selectedindexchange event.
Rockstar_ 3-Jun-13 6:41am View
If not there then create it by selecting the gridview ,go to solution explorer and then event , search for pageindexchanging event and then double click to open..
Rockstar_ 3-Jun-13 6:36am View
And this is selectedIndex changed event, not pageIndexChanged Event...

please rectify..
Rockstar_ 3-Jun-13 6:34am View
Design source code dear? not code behind code...
Rockstar_ 3-Jun-13 6:26am View
First u get all the table names
Rockstar_ 3-Jun-13 6:23am View
Paste ur source code dear?
Rockstar_ 3-Jun-13 6:15am View
go to the design of the gridview control and check whether the PageIndexChanging event is there or not?

Otherwise paste ur gridview design code here...
Rockstar_ 3-Jun-13 6:09am View
No, You can't create, you have to start from scratch....
Rockstar_ 3-Jun-13 5:50am View
You can write a javascript function to calculate this...
Rockstar_ 3-Jun-13 5:48am View

Instead of * , select the required column.
Rockstar_ 3-Jun-13 5:47am View
But not in tree structure..
Rockstar_ 3-Jun-13 5:44am View
you can get these details in sql also?
Rockstar_ 3-Jun-13 5:34am View
Could you please elaborate ur question ?
Rockstar_ 3-Jun-13 5:12am View
What problem then?
Rockstar_ 3-Jun-13 5:00am View
Do you need collapsible div?
Rockstar_ 3-Jun-13 2:02am View
Specific period?
Rockstar_ 31-May-13 7:52am View
What not working dear?
Rockstar_ 31-May-13 6:36am View
Give height and width also for table and then check..
Rockstar_ 31-May-13 6:29am View
You can do this very easily with Javascipt or jQuery?
Rockstar_ 31-May-13 6:23am View
There will be some other events will there form closing event , just write the same code in that event also...
Rockstar_ 31-May-13 6:06am View
Could u plz elaborate ur question?
Rockstar_ 31-May-13 6:04am View
I have checked the link, but still not understood what is the problem...
Rockstar_ 31-May-13 6:04am View
Do you want to display data in a tabular format?
Rockstar_ 31-May-13 5:32am View
What suggestion u want?
Rockstar_ 31-May-13 5:32am View
What you need?
Rockstar_ 30-May-13 8:09am View
Check with once SQL server Profiler in tools menu of SSMS.
Rockstar_ 30-May-13 7:52am View
You can use sql server Profiler, which is available in Tools menu of SSMS...
Rockstar_ 30-May-13 7:50am View
Is ur database is also on the same server?
check for any schedule is running?
otherwise reset the IIS settings...
Rockstar_ 30-May-13 7:42am View
Is this the thing you wanted?
Rockstar_ 30-May-13 7:38am View
Please user the button "Have a Question or Comment" don't use Add solution button for replying the answers...
Rockstar_ 30-May-13 7:34am View
Put a background image with a folder icon
Rockstar_ 30-May-13 6:53am View
What u do is , write if condition for lessthan and greaterthan
Rockstar_ 30-May-13 6:53am View
Can i have ur code?
Rockstar_ 29-May-13 1:22am View
Put email manually in the from and to address then check, where the actual error is?
Rockstar_ 29-May-13 1:00am View
Do you want to update the columns withe new values or you want to insert new row based on the previous row data?
Rockstar_ 29-May-13 0:44am View
How could he can call the JS before adding the item, after selecting the item from the listbox can only display the item in pop up not before selecting the item.....
Rockstar_ 29-May-13 0:34am View
Put the label in another panel and try to call that panel by ModalPopUpextender by add button click event.
Rockstar_ 29-May-13 0:24am View
you can write query for getting data based on companyID, then insert all those records to a new table then take backup. Do this for all CompanyId's.
Rockstar_ 29-May-13 0:21am View
Yes, in the button click only set the label text property to the username or user id....
Rockstar_ 29-May-13 0:16am View
Too good ,easy to understand...My 5!
Rockstar_ 29-May-13 0:02am View
Well Explained...
Rockstar_ 28-May-13 23:34pm View
What output u need to display?
Rockstar_ 26-May-13 23:47pm View
I think u have wrong code it would be something like this :
Session.Add("astring", Request.QueryString["any string"]);
Rockstar_ 24-May-13 1:18am View
Windows or web?
Rockstar_ 24-May-13 0:31am View
What is the problem?
Rockstar_ 24-May-13 0:24am View
What is ur requirement?
Rockstar_ 24-May-13 0:11am View
Good link...
Rockstar_ 23-May-13 2:09am View
Do u use any ajax controls in ur app?
Rockstar_ 23-May-13 2:08am View
Please check my solution
Rockstar_ 23-May-13 2:06am View
Give full access permission to c:\ drive only and then check...
Rockstar_ 23-May-13 1:58am View
Try by giving some other drive path for destination file.?
Rockstar_ 23-May-13 1:53am View
Could u plz try once by giving the full access permission for the folder...
Rockstar_ 22-May-13 6:35am View
Try this solution, I think it will work.....
Rockstar_ 22-May-13 6:33am View
You can use the improve question linkbutton for modifying the question....
Rockstar_ 22-May-13 6:25am View
Remove semicolon and try : Text="<% #EVAL('Discription');
Rockstar_ 22-May-13 2:07am View
Could u plz provide ur sample code?
Rockstar_ 22-May-13 2:01am View
while registration why do you kept delete button?
Rockstar_ 22-May-13 2:01am View
ok, You store the usertype in database, fetch the usertype and validate...
Rockstar_ 22-May-13 1:56am View
You can do like this, remove all alphabets from the string and replace comma with period.
Rockstar_ 22-May-13 1:54am View
What u want to do actually? How could u attach a file to an excel file?
Rockstar_ 20-May-13 7:45am View
You can use, AJAX's ModelPopUpExtender to display a customized popup...
Rockstar_ 20-May-13 7:43am View
add one more itemtemplate then add a hyperlink