Click here to Skip to main content
15,390,740 members

Comments by virang_21 (Top 116 by date)

virang_21 3-Sep-16 18:02pm View
   
You need to add reference to Ajax Control Toolkit to your project and add assembly reference in your page.
virang_21 6-Mar-16 22:30pm View
   
it turns out that this innocent looking line in the catch block is the culprit.

error = ((HttpWebResponse)wex.Response).StatusDescription;

if wex.Response is null this will result in exception which is not handled.
virang_21 6-Mar-16 21:47pm View
   
error is passed to method as "ref string error". I am just setting it to empty string. Evan if its value is null that will not result in NullReferenceException as first thing method does is set it to empty string.

This is how method is called from application

string error = "";
OutboundData objOutbound = new OutboundData();
objOutbound.ChangeOrder(conumber, recepitNo, webServiceURL, username, password, ref error);
virang_21 4-Nov-15 16:19pm View
   
Yes you are right in saying that PATH variable is the issue. After posting this question I did some further testing. PATH is set to include directory pointing to java.exe. The problem is when scheduled task is set to run once a day scheduled task pick proper PATH variable with directory to java.exe but when scheduled task is set to run multiple times a day it somehow it excludes anything that was added to PATH in Environment variable except whatever was set by OS. I suspect there is a bug in windows task scheduler in server 2012.
virang_21 2-Jun-15 18:55pm View
   
Change your URL in AJAX call to url: "Bind.aspx/BindDatatable"
virang_21 24-May-15 23:33pm View
   
My questions are specific to ASP.NET web api not MVC in general.
virang_21 30-Apr-15 23:04pm View
   
Declare your class1 as public.

Access modifiers https://msdn.microsoft.com/en-us/library/ms173121.aspx
virang_21 16-Apr-15 0:12am View
   
check this

http://www.c-sharpcorner.com/UploadFile/4d9083/binding-radiobutton-and-radiobuttonlist-in-various-way-in-mv201/
virang_21 15-Mar-15 19:51pm View
   
Hi SA, Can you please help me with below question ? This is related to this very application I am writing.

http://www.codeproject.com/Questions/885879/Multi-threaded-Application-Queue-Select-Work-Item
virang_21 7-Mar-15 3:43am View
   
Thank you for your input. I am implementing proof of concept at the moment and yes I created console app to start with so I can see all the interaction between systems. Eventually I need to move it to windows service or something else. I changed it to single application with multiple threads and each thread is constantly running and checking queue for work.
virang_21 9-Feb-15 0:13am View
   
Please post part of the source code that is causing issue.
virang_21 9-Feb-15 0:12am View
   
There is an option of transparent data encryption at SQL Server database level... http://sqlmag.com/database-security/sql-server-encryption-options
virang_21 2-Feb-15 23:42pm View
   
One simple solution ..... ^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$
virang_21 2-Feb-15 23:31pm View
   
your this Index method is expecting more input fields then the one you are passing. Where is the value for col01,col02 and col03 ?
virang_21 2-Feb-15 20:44pm View
   
Do you have HttpPost ActionResult for Index defined in your Index controller ?
[HttpPost]
ActionResult Index()
{
return View();
}
virang_21 20-Jan-15 0:30am View
   
This control is based on HTML 5 . Check this for more details : http://www.chartjs.org/docs/#notes-browser-support
virang_21 15-Jan-15 19:12pm View
   
Are you trying to send data or column names ?
virang_21 8-Jan-15 0:05am View
   
your update query is missing where clause.
UPDATE articles SET views = views + 1 where id=$article_id
virang_21 19-Dec-14 0:20am View
   
Maybe server is flushing the buffer on acknowledgement before putting next message in the buffer. In that case

Server Send Msg1
Client Read Msg1
Server Send Msg2
Client Send Ack1
Server Flush Buffer and Send Msg 3
Client Read Msg3 and missed Msg2

This is just a guess
virang_21 19-Dec-14 0:02am View
   
One solution is if your message that you are getting from server is of fixed size and you receive two message together then split the message and send two acknowledgements to the sever.
virang_21 18-Dec-14 17:09pm View
   
May be it has to do with the speed at which your server is writing data to NetworkStream. 5 to 10 messages a second. It may be the case that before your client read the data server has already appended the NetworkSteam with next message.
Ideally you want
Sever Send
Client Read
Client Ack
Sever Send
Client Read
Client Ack

but what may be happening is
Server Send Msg 1
Client Read Msg 1
Server Send Msg 2
Client Send Act 1
Server Send Msg 3
Client Read Msg 2 & Msg 3 together from Stream
virang_21 12-Dec-14 16:43pm View
   
Adding a web reference is for asmx web service ( old way of doing things ) while adding a service reference is for WCF which is more flexible compared to asmx web service.
virang_21 27-Nov-14 16:40pm View
   
Make sure you have included JQuery first before you include bgiframe. Your script tag should be like Jquery.js , bgiframe.js, Jquery-UI.js
virang_21 27-Nov-14 16:25pm View
   
Make sure your WCF service is running. Did you host it in IIS or is it a self hosted windows service ? What did you specify as endpoint for WCF in web.config/app.config file.
virang_21 24-Nov-14 23:24pm View
   
where is your code ?
virang_21 6-Nov-14 17:24pm View
   
There may be a better way to do it but have a look at this article

http://www.developer.com/net/csharp/article.php/3088231/Exception-Handling-in-Web-Services.htm

virang_21 6-Nov-14 17:13pm View
   
<compilation debug="true" targetframework="4.5">

see if changing targetFramework to 4 makes any difference . Just a guess.
virang_21 6-Nov-14 17:05pm View
   
Is it a WCF service or asmx web service ?

For WCF service

http://www.codeproject.com/Articles/294609/Uing-FaultContract-to-throw-custom-error-informati

virang_21 29-Oct-14 20:47pm View
   
You are right.. it is more like implementation option to choose from
virang_21 29-Oct-14 20:47pm View
   
Deleted
You are right it is more like implementation option to choose from
virang_21 23-Sep-14 23:59pm View
   
Do you have report viewer installed on your server ?

Set CustomerErrors mode to Off in your config file to see what actual error is occurring on your server. At the moment your config file is set to not display exception.
virang_21 21-Sep-14 21:29pm View
   
Your sql statement is not using any value from row. All I can see from where condition is status =2 which will give you same information all the time.
virang_21 2-Sep-14 18:32pm View
   
Put your drop downs inside UpdatePanel which will not refresh the entire page.
virang_21 21-Jul-14 6:46am View
   
$.ajax is defined within Plugin code which has success method but no error method. My question is if in a function that has $.ajax if you don't define error:function() will it give any error information back to user function ?

function MyFunction()
{
PluginFunction();
}

In my plugin.js file
function PluginFunction()
{
$.ajax(function(){
//make call to get info

success:function(){
Send List of addresses
}

// This bit is missing
error:function(){

}

});
}
virang_21 26-Mar-14 18:20pm View
   
What did you try so far..? code ?
virang_21 25-Mar-14 1:44am View
   
Try to have a look at IIS log.. that will provide more information as to why it is giving 500 internal server error.
virang_21 14-Mar-14 22:38pm View
   
This is what I mean by security context.. http://postimg.org/image/ju2m1vua1/

#duxfea@domain.com user needs to execute the REST API call. Withing TEST_API_Service (My WCF Service ) is a method called GetStatusOfWarehouse () that calls REST API. Is it possible to create NetworkCredential object that somehow pickup #duxfea@domain.com as a username and its password without passing it explicitly when calling REST API.
virang_21 14-Mar-14 22:31pm View
   
My WCF service is running with specific username user@domain.com. WCF service is self hosted windows service. This windows service is running with user@domain.com login name and password. They don't have technical knowledge of how to do it but the whole issue is not to pass username/password directly from the code but to pick up from the service security context. I need to be 100% sure before I tell them it is not possible with Basic authentication to create NetworkCredential object without explicitly passing username/password. Hope you get my point. It is getting hard to explain. Thank you for your help so far.
virang_21 14-Mar-14 22:19pm View
   
I don't want to create NetworkCredential object passing user name and password ( Request from company to use security context of the service rather than passing value directly ) .If I pass the way you suggested by creating network credential object by passing username/password explicitly it works. Somehow creating network credential object using current security context of the service is the issue. Is it not possible at all what I am trying to achieve ?
virang_21 14-Mar-14 21:55pm View
   
It is using Basic Authentication to validate credential. I can confirm this because when I execute REST API url directly in browser it prompts for username/password dialog. Also using Soap UI tool it is showing WWW-Authenticate Basic Realm="TEST" as a part of response header. My fear is that somehow when creating NetworkCredential object the way I did is not passing credential info to the request. Any suggestion ?
virang_21 14-Mar-14 19:39pm View
   
The code that i posted was workingbut they made some changes to make our test ERP environment same as production and it stoped working. It is good that i find out about it before system went to prod but now i am stumped on how to authenticate user when calling web service.
virang_21 14-Mar-14 19:34pm View
   
The problem is those REST eeb services are exposed by corporate ERP and there is no documentation on how to use them. You may be right that it may be using forms auth..how to do it if it is using forms auth ?
virang_21 21-Oct-13 17:27pm View
   
Try to catch inner exception when returning JSON to see what exactly is failing..

catch (WebException wex)
{
result = ((HttpWebResponse)wex.Response).StatusDescription;

}
virang_21 11-Jun-13 19:06pm View
   
Best solution for you is to use Repeater control and add table in it with one header row for your column names and one data row for your data from database. That way you will be able to repeat the header for each row
virang_21 11-Jun-13 1:33am View
   
You can use the insert trigger on the table to generate the ids.
virang_21 10-Jun-13 19:00pm View
   
Than you don't need to recreate user or configure anything on you notebook again. As long as you have SQL Server Management Studio on your notebook just connect to your desktop instance of SQL server by specifying server name as IP address of your desktop and connecting to it. Make sure you have configured your SQL Server installation on desktop to allow remote connection.
virang_21 6-Jun-13 23:15pm View
   
Are you trying to connect to same database over the network ?
virang_21 6-Jun-13 23:13pm View
   
If your button is inside update panel did you add <Triggers> section to your update panel ?

<Triggers>
<asp:PostBackTrigger ControlID="btnMyButton" />
</Triggers>

Also set UpdateMode="Conditional" for your Update Panel
virang_21 6-Jun-13 1:36am View
   
provide your generation code for textboxes.
virang_21 29-May-13 20:06pm View
   
make sure in your timer control's tick event you have UpdatePanel1.Update() method called at the end.
virang_21 29-May-13 18:22pm View
   
Than you have to change your logic. Understand the page & control's life cycle.
virang_21 8-May-13 2:17am View
   
Create console application and schedule it to run every few minutes or whatever frequency you want.. other option is to create windows service application and install it on the box and let it run and trigger action on timer control ....
virang_21 8-May-13 2:01am View
   
One alternative to your solution is to implement login facility for WCF service and check for login credentials when outside request come to your web service... Just like how payment gateway APIs are implemented by banks...
virang_21 8-May-13 1:55am View
   
So do it ... Where is the problem ?
virang_21 8-Apr-13 2:23am View
   
Add this to your javascript function at the end

__doPostBack("<%=ddlCountry.ClientID %>", '');
virang_21 8-Apr-13 2:13am View
   
Post your javascript code
virang_21 8-Apr-13 2:07am View
   
Set AutoPostBack property to true for dropdown
virang_21 5-Sep-12 21:51pm View
   
missing runat="server" ? .. also check control ID you are trying to retrieve in button click event ..
virang_21 3-Sep-12 20:14pm View
   
If database operation to display some information you don't need to load all the data .. just select only number of records that you want to show on that page... it is always better to select top 100 records then selecting say 100000 records and displaying just 100 of them... implement lazy loading ... Avoide any resource intensive calculations / operations in page load if you can...
virang_21 3-Sep-12 0:17am View
   
call your javascript function on button submit or onblur event of textbox
virang_21 29-Aug-12 0:00am View
   
yes it is possible..check System.IO.File .. read the file ... iterate throguth it line by line and look for your matching string..
virang_21 17-Aug-12 1:31am View
   
Add a reference to your DTO classes in application that is consuming your WCF service so when you add a service refernece to your WCF consuming application you can use the proprietary object that any method in your service is returning.
virang_21 17-Aug-12 1:27am View
   
If you want to persist data keep it in database table with user name and search term. If you need it just for that interaction period store it in session and on logout display what is in session
virang_21 15-Aug-12 0:45am View
   
you can add a regular expression validators on textboxes or just check it in your javascript function call for -ve values. if(t1<0) {alert("total fees cannot be negative."); } . For decimal values change your parseInt to parseFloat()
virang_21 12-Aug-12 0:35am View
   
check iTextSharp library...it is easy to use and open source..
virang_21 12-Aug-12 0:32am View
   
try setting text property of label with content of your comment with html tags as is...
virang_21 11-Aug-12 23:17pm View
   
what kind of control you are displaying your text in ?
virang_21 9-Jul-12 16:50pm View
   
Iterate through your gridview row and see if your checkbox is checked or not to get Id.

foreach(GridViewRow row in grdViewId)
{
if( row.FindControl("myCheckboxId")!=null)
{
Checkbox chkBox = (Checkbox)row.FindControl("myCheckboxId");
if(chkBox.Checked)
{
//Process checked row
}

}
}

You need to have a template column in your griview that contains Checkbox with ID=myCheckboxId.
virang_21 27-Jun-12 17:05pm View
   
You need to add columns to your gridview. And you are trying to access all the values from cells(0). It has to be like Cells(0),Cells(1),Cells(2) etc. Think of it as a table with number of rows and cells.

Dim Location_Name As String = row.Cells(0).Text.Trim()
Dim Comp_City As String = row.Cells(1).Text.Trim()
Dim Comp_State As String = row.Cells(2).Text.Trim()

Then your GridView needs to have those columns

<gridview ......="">
<columns>
<asp:boundfield datafield="Comp_City" headertext="Comp_City">
<asp:boundfield datafield="Comp_State" headertext="Comp_State">
<asp:boundfield datafield="Comp_Address_One" headertext="Comp_Address_One">
virang_21 15-Jun-12 1:10am View
   
Use MDI form if it is windows application
virang_21 12-Jun-12 21:29pm View
   
Put your tab container inside update panel and use Ajax for partial postback
virang_21 12-Jun-12 0:14am View
   
There is a Google for that ... Try before you ask for help otherwise you never learn..
virang_21 7-Mar-12 14:58pm View
   
Hi Ryan, The big question mark is I don't have any database related connection on that page... Apart from that it works perfectly fine in development environment... I am validating users against AD nothing to do with database....
virang_21 7-Mar-12 4:07am View
   
Well I tried that solution but it did not work ... :-(
virang_21 2-Mar-12 18:58pm View
   
I have updated the question.
virang_21 22-Jan-12 14:49pm View
   
Increase your pos value by 2 every iteration to take care of ",". In the while loop set your @Pos=@Pos+2
virang_21 13-Jan-12 19:48pm View
   
Make sure you check for null values in Date fields.
virang_21 13-Jan-12 19:46pm View
   
I just realized you put your textbox inside EditTemplate. Put it inside your ItemTemplate and you will be OK.
virang_21 12-Jan-12 4:28am View
   
Are you using the same browser outside too ? Is the external application hosted on different server ? If so check Ajax tool kit is installed on that server .. I am assuming that u r using AjaxControlToolkit here ..
virang_21 9-Jan-12 16:51pm View
   
Are you generating a postback on Radio button selection ?. If so make sure you persist the values entered in DataGrid
virang_21 9-Jan-12 5:24am View
   
Check your browser is not preventing it. If it is disabled in your browser it will not work. Also add language="javascript" to your script tag.
virang_21 23-Dec-11 20:12pm View
   
Deleted
No worries dude... I am working on it to make it perfect.. stay tuned for V2
virang_21 18-Dec-11 0:52am View
   
in your web.config file set debug="false"... which is by default true.
virang_21 17-Dec-11 17:56pm View
   
Check point 4 of the solution.
virang_21 17-Dec-11 17:54pm View
   
Deleted
Two things : in your web.config add

<customerrors mode="On" defaultredirect="~/Error.aspx" redirectmode="ResponseRedirect">

and set

<compilation debug="false">

in your production version to redirect users to error page.
virang_21 16-Dec-11 18:03pm View
   
How many tabs you have ? ... provide some code what you have done so far ?
virang_21 25-Nov-11 18:43pm View
   
Yea I have looked at that option but somehow it is not liking Distinct operator with Pivot... or maybe I am missing something there ...
virang_21 28-Oct-11 19:19pm View
   
Sorry mate ... miss typed it.. it is webforms... I think I need another morning coffee ... :-)
virang_21 28-Oct-11 19:14pm View
   
Well the app is running for one business unit and it is winforms application and it was tested and in production and now other business units wants it. I cannot go around and propose different architecture which leads to modification and testing for first business unit as well. I have to find viable solution in existing architecture. Thank you for your reply but I am afraid I cannot use MVC at this stage.
virang_21 20-Oct-11 20:04pm View
   
For Non technical questions and answers :

http://thefourthwisemonkey.wordpress.com/2010/02/13/common-interview-questions-and-answers/
virang_21 18-Oct-11 1:08am View
   
Check updated solution.
virang_21 17-Oct-11 17:59pm View
   
Add ModalPopupExtenderLogin.Show() to your code behind in a proper place when you want to show your model popup extender.
virang_21 15-Oct-11 21:41pm View
   
Looking at the number of questions you posted looks like you need a lot of training before you can do your assignment/work. Take some online class or checkout www.asp.net and go through training mate !!!
virang_21 10-Oct-11 18:22pm View
   
Google form based authentication with role based security. You will find plenty of examples to deal with your question.
virang_21 1-Oct-11 23:01pm View
   
Ask google how they made Gmail .. better if you have Chinese hacker connection.. they can provide you the source code for gmail chat ..
virang_21 28-Jun-11 19:53pm View
   
I am not sure what you are using lightbox for but here is a lightbox based control you might want to use.

Notes For Gallary (http://notesforgallery.codeplex.com/)
virang_21 16-Jun-11 19:01pm View
   
You can create a handler .ashx that will retrieve it from database and then you can bind it to image control.
virang_21 8-Jun-11 23:00pm View
   
Client is an education provider ( Business College ) . Those master pages contain menu which is identical but background image on the master page is different (One big image cut into 3 different parts) . The big issue I am facing is that the background images for both the master pages are not cut exactly same pixels ( Image 1 : Part A : 225 X 650 , Image 2 : Part A : 179 X 650 ). The problem is that graphics designer works just one day for client and always busy with other work and client expect things get done ASAP. That is the reason I created 2 master pages with different background to give it different look ( Workaround when resources are not available :-( ).
virang_21 8-Dec-10 15:46pm View
   
I am not sure if DNS redirect is making every request a cross domain request ?
virang_21 23-Nov-10 0:34am View
   
Change Regular expression to ^\d(\d*[-]\d*)*\d*$
virang_21 22-Nov-10 23:35pm View
   
Yes my solution will work for anything like digit followed by any word followed by digit. It cannot handle spaces in between. If you want spaces use the regex in answer 1. I gave a link to regex builder so try your regex on it and see if it meet your need.
virang_21 3-Nov-10 20:44pm View
   
This is 10 on 10.. Worked like a charm. I have to figure out about Model popup extender now. This solution works fine with just a page or directory needing SSL. Thanks a lot.
virang_21 3-Nov-10 17:23pm View
   
Thank you for the link . I will check it and let you know how I fare with the issue.
virang_21 3-Nov-10 17:23pm View
   
Thank you for the links . I will check it and let you know how I fare with the issue.
virang_21 11-Oct-10 6:45am View
   
Yea it was typo .. I thought there was some issue with code but it wasn't the case ..
virang_21 11-Oct-10 1:05am View
   
What is Edited in the answer ?
virang_21 3-Oct-10 3:39am View
   
You should use proper variable names rather than a,b,c etc. otherwise you / someone else will have a hard time managing this code later !
virang_21 29-Sep-10 22:32pm View
   
The web application is used by 400 agents so may be one of them doing something like that is possible.

Is there any programmatic way to prevent this ?

Alternative for me is to check for duplicate records in database and give admin option to delete them but I want to prevent this behavior of multiple records in database.
virang_21 24-Sep-10 6:03am View
   
Please be specific with your question and provide source code if possible. In general I will say rebind your gridview to modified data source in dropdown list's item index changed event.
virang_21 18-Sep-10 19:26pm View
   
You can store it in database (Many options : Oralce , MSSQL, MySql) or in directory. It all depends on how you design your application. I am working on a web application for one of the college and I used both the ways according the requirements.
virang_21 16-Sep-10 19:18pm View
   
Yes I am indeed referencing to System.Data.DataSetExtensions.dll. It is in bin folder of my application and I checked the production server as well it is there too. Anyways my issue is resolved now by installing Telerik control suit on production server.
virang_21 16-Sep-10 7:15am View
   
I am generating studentid using this stored proc. The business logic for studentid is different . It has first two digit of year and next two digit is from 01 to 08 indicating term no and next three digit is sequential number . So for student starting in term 01of year 2010 will have id like 1001xxx. I am using stored proc to generate xxx part of the studentid number . I have to make sure that studentid is unique for each student .
virang_21 1-Sep-10 2:49am View
   
txtTotalSplit is showing proper value on client side. which means there is no issue with javascript setting its value. But it has "" as its value on postback. I explicitly set its EnableViewState="true" ...

I checked with setting txtTotalSplit value to constant as you mentioned like '1000' but still same result...

<asp:textbox id="txtTotalSplit" runat="server" enabled="False" enableviewstate="true">
virang_21 1-Sep-10 2:36am View
   
I am not setting its value anywhere in code behind ...
virang_21 25-Aug-10 23:05pm View
   
What is your rational behind it ?
virang_21 24-Aug-10 22:43pm View
   
No there is no exception generated. It is funny that it started working after one hour or so as it suppose to without any change to the code. I am using XCopy deployment. Does its previous behavior of not working properly has anything to do with that ? I am super curious now to know what exactly happening here. Any clue ?