Thank you sir...i got it worked through your solution..but its only working in LAN not in WAN...though i did port forwarding as well n provided my hosting machine ip address, lan port i.e 8023 and wan port i.e 8080 ...then trying to access my application on different machine in same lan by giving ....url as public ip address/www.xyz.com...but its saying web page cant be displayed on different machines..
Please guide me to overcome this issue as well
I want to be able to populate a drop down list based on the selection of another one or others using vb.net and also pass the value selected to another page or within the same page. for instance one drop down to select a country and a second one to populate the cities based on the first selection. I added one in the code below one below so need to add another one and populate it based on the selection in the first one. I am not using a Database. I just want the selection from the list as it is added manually.. Can you please advise of an example on how to achieve this or help exapand the code below . Thanks
Sub Button_Click( s As Object, e As EventArgs )
if IsValid then
response.redirect ("test.aspx?id=" & countries.Text & " ")
Select a Country <asp:DropDownList ID="countries" runat="server"
<asp:Button ID="Button1" runat="server" Text="Search..." onclick="Button_Click" />
when writing sql query in aspx file having alias with space I:e select emp_no as " emp no" working fine in database but giving syntax error when i run the same query in .aspx page of asp.net which is code behind file..how to resolve this issue?
We are working on an eCommerce application nearly ready to go online.
The issue we face is that when we upload an image to the product, it does not fit in the prorate form, It gets stretched either vertically or horizontally thereby getting it out of shape.
The image thumbnail layout type that we have in the front end is in Landscape, and if the image being uploaded is in a landscape format, it fits perfectly, also with size reduction. But if the image being uploaded is in Portrait format, it gets stretched to the full width making it look 'out of shape'.
Will appreciate if some one can suggest a code or an external API which can display the image in proportionate without stretching.
You can either display the image as it is, or if you really want to make it a set size you'll need to change the image when you upload it so it fits the space. Google for "c# change aspect ratio of image" and you should find some sample code, it's just a bit of maths and using GDI.
You'll struggle to do this because asp.net can't access the client hardware. If you did some basic research and googled you'd find questions from the countless other people that want to scan QR codes and use fingerprint readers that have all been told much the same thing.
I have question about testing my web application in window phone. i was made one application in Asp.net(c#) in this application i use Canvas Control for users digital signature. my application working fine in Android and i-phone application . Now i want to test this application on window phone . so there is any way to test application in window phone from my Visual Studio 2012 or any Emulator for that.
The same way you'd write any other SQL query in the code-behind.
using (SqlConnection connection = new SqlConnection("YOUR CONNECTION STRING"))
using (SqlCommand command = new SqlCommand("SELECT CASE WHEN @Flag = 1 THEN 'Yes' ELSE 'No' END FROM YourTable", connection))
If you want a more detailed answer, then you're going to have to provide a more detailed question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
The web application for the program proved to be too difficult for average people to use. I used CKEditor for folks to create the messages, and wrote a service to send them from the website.
But I changed the service over to Entity Framework, and I'm having trouble with it. So for black Friday, I wrote a windows app to send the Black Friday Emails, and it was just easier to do. So I thought I'd write a windows app to do the whole thing.
It's been so long since I wrote the service, I forgot how to debug it.
I wrote a web service, and tied it to an asmx page.
Then I wrote a Serializable Class, with get and set, for the request and response.
In the web service, the input is the request class, and it outputs the response class. Used SQL Linq for the database calls.
Then in the Windows App, I created a service reference, using the WSDL that is generated when you add ?wsdl to the url. And in calling the service, I just changed the endpoint, and used basic http binding to test it.
So the class I need for the request and response are contained in the Service Reference.
And I just used those classes as a ListOf, to populate a listview control.
So I guess the whole thing happens with SOAP.
I'm impressed, had no idea it would be that easy to do. I've always consumed web services, but never wrote one. The ones I wrote were for JQuery, and returned JSON back to be parsed.
Most things are easy - once you know how to do them!
There's a well-known story about a mathematician giving a lecture - he's scribbling away on the blackboard, one equation after another, saying "and so it follows... (scribble scribble) therefore ... (scribble scribble)..." and then he gets to "..and thus it is obvious that (scribble scribble)" - then he pauses and adds "Well, I think it's obvious... hmm..." He stops and thinks for a bit, scratching his beard. Consults his books and notes - finally looks up triumphantly and exclaims "I was right! It is obvious!"
The fact that you are doing this remotely is a fairly important piece of information you should have included in your original question.
If you want to access the files remotely you'll need to do it via a UNC, which is the format you use to reference files over a network. If the files are at c:\inetpub\wwwroot\logs on a machine called "MyIIS" then you can access that folder from another machine using \\MyIIS\c$\inetpub\wwwroot\logs. This will need admin rights on the target machine. An alternative is to explicitly share the logs folder so you can control the access rights and use \\MyIIS\logs
Not a question. However, if it were a question regarding what can a heavy traffic website handle the answer would still be "it depends." Availability and responsiveness are dependent on many different factors including the performance of IIS and then also of the sql db and the network. Many, many, different factors.
There are only 10 types of people in the world, those who understand binary and those who don't.
i am novice in asp.net and i want to write an sql query that will calculate student grade and grade point base on the condition bellow.
WHEN EXAMS BETWEEN 75 AND 100 THEN 'A'
WHEN EXAMS BETWEEN 70 AND 74 THEN 'AB'
WHEN EXAMS BETWEEN 65 AND 69 THEN 'B'
WHEN EXAMS BETWEEN 60 AND 64 THEN 'BC'
WHEN EXAMS BETWEEN 55 AND 59 THEN 'C'
WHEN EXAMS BETWEEN 50 AND 54 THEN 'CD'
WHEN EXAMS BETWEEN 45 AND 49 THEN 'D'
WHEN EXAMS BETWEEN 40 AND 44 THEN 'E'
WHEN EXAMS BETWEEN 40 AND 0 THEN 'F'
please how can i do this query, than you
Entity framework returns no columns but in sql its returning.?
/****** Object: StoredProcedure [dbo].[usp_s_UDMFieldChaltaNos] Script Date: 11/20/2015 12:29:54 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
ALTER PROCEDURE [dbo].[usp_s_UDMFieldChaltaNos]
declare @par nvarchar(max)
declare @parMain nvarchar(max)
--SubChaltaNo is null and
set @par= ' where DistrictCode=' + convert(nvarchar(3),@DistrictCode)
set @parMain= ' where a.DistrictCode=' + convert(nvarchar(3),@DistrictCode)
set @par=@par + ' and TalukCode=' + convert(nvarchar(3),@TalukCode)
set @parMain=@parMain + ' and a.TalukCode=' + convert(nvarchar(3),@TalukCode)
set @par=@par + ' and TownId=' + convert(nvarchar(3),@TownId)
set @parMain=@parMain + ' and a.TownId=' + convert(nvarchar(3),@TownId)
set @par=@par +' and ChaltaId not in (select ChaltaId from UPOR_Property_Main where
DistrictCode='+ convert(nvarchar(3),@DistrictCode) +' and TalukCode='
+ convert(nvarchar(3),@TalukCode) +' and TownId= '+ convert(nvarchar(3),@TownId) +') '
set @par=@par + ' and ZoneId=' + convert(nvarchar,@ZoneId)
set @parMain=@parMain + ' and ZoneId=' + convert(nvarchar,@ZoneId)
set @par=@par + ' and SectorId=' + convert(nvarchar,@SectorId)
set @parMain=@parMain + ' and SectorId=' + convert(nvarchar,@SectorId)
set @par=@par + ' and BlockId=' + convert(nvarchar,@BlockId)
set @parMain=@parMain + ' and BlockId=' + convert(nvarchar,@BlockId)
set @par=@par + ' and WardId=' + convert(nvarchar,@WardId)
set @parMain=@parMain + ' and WardId=' + convert(nvarchar,@WardId)
set @par=@par + ' and LocalAreaNoId=' + convert(nvarchar,@LocalAreaNoId)
set @parMain=@parMain + ' and LocalAreaNoId=' + convert(nvarchar,@LocalAreaNoId)
set @par=@par + ' and PTSheetId=' + convert(nvarchar,@PTSheetId)
set @parMain=@parMain + ' and PTSheetId=' + convert(nvarchar,@PTSheetId)
set @par=@par + ' and HouseNo = ' + char(39) + @HouseNo + char(39)
set @parMain=@parMain + ' and HouseNo = ' + char(39) + @HouseNo + char(39)
set @par=@par + ' and PropertyNumber = ' + char(39) + @PropertyNumber + char(39)
set @parMain=@parMain + ' and PropertyNumber = ' + char(39) + @PropertyNumber + char(39)
set @par=@par + ' and CitySurveyNo = ' + char(39) + @CitySurveyNo + char(39)
set @parMain=@parMain + ' and CitySurveyNo = ' + char(39) + @CitySurveyNo + char(39)
set @par=@par + ' and isdeleted is null'
set @parMain=@parMain + ' and Type=''S''
and a.MainChaltaId in (select chaltaid from dbo.UPOR_Property_Main)
and a.chaltaid not in (select chaltaid from dbo.UPOR_Property_Main) and isDeleted is null'
--(case when AdditionalNo IS Null then convert(varchar,ChaltaNo) else convert(varchar,ChaltaNo) +'+'''/''' +'+ AdditionalNo end )as ChaltaNo
--convert(varchar,isnull(AdditionalNo,'''')) as ChaltaNo
declare @query nvarchar(max)
declare @queryMain nvarchar(max)
set @query= 'select ChaltaId,
(Case when Additionalno is null and subchaltano is null then convert(varchar,chaltano)
when Additionalno is not null and subchaltano is null then convert(varchar,chaltano) +'+'''/'''+'+ additionalno
when Additionalno is null and subchaltano is not null then convert(varchar,chaltano) +'+'''-'''+'+ convert(varchar,subchaltano)
else convert(varchar,chaltano) +'+'''/'''+'+ additionalno +'+'''-'''+'+ convert(varchar,subchaltano) end) as ChaltaNo
set @queryMain=' UNION select distinct a.chaltaid,
(Case when a.Additionalno is null and a.subchaltano is null then convert(varchar,a.chaltano)
when a.Additionalno is not null and a.subchaltano is null then convert(varchar,a.chaltano) +'+'''/'''+'+ a.additionalno
when a.Additionalno is null and a.subchaltano is not null then convert(varchar,a.chaltano) +'+'''-'''+'+ convert(varchar, a.subchaltano)
else convert(varchar,a.chaltano)+'+'''/'''+'+ a.additionalno +'+'''-'''+'+ convert(Varchar,a.subchaltano) end) as ChaltaNo
from UPOR_ChaltaMain as a,UPOR_Property_Main as b'
set @queryMain=@queryMain + @parMain
set @query = @query + @queryMain
-- DistrictCode='+ convert(varchar,@census_dist_code) +' and TalukCode='+ convert(varchar,@census_taluk_code) +'
-- and TownId=' + convert(varchar,@TownId) + convert(varchar,@WhrVal)
declare @queryUNION nvarchar(max)
set @queryUNION='select distinct chaltaid,ChaltaNo from ('+@query+') as c '+' where ChaltaId !=0 '
I have Visual Studio 2010 Professional which should have the chart control in the toolbox. It is checked as being in the toolbox for both web forms and windows forms, but it is not showing. Is there some way to fix this? My projects are VB.
Thank you. I resolved the issue thus: Loaded Visual Web Developer 2008 and added chart control to the toolbox. Opened VS 2010, unchecked chart controls from the Add Controls Dialog. Then added them back. Voila! Now the chart control appears in the vs 2010 toolbox.
Windows update kept trying to install update for the control, and failed for 5 days. Now the update should work. Hope this helps anyone who is experiencing a similar problem.
When using named parameters in an SQL statement called by an OracleCommand of CommandType.Text, you must precede the parameter name with a colon (:). However, in a stored procedure, or when referring to a named parameter elsewhere in your code (for example, when adding OracleParameter objects to the Parameters property), do not precede the named parameter with a colon.
cmd.CommandText = "select SITIOSEDENAME from INV_SITIOSEDE where SITIOSEDENAME like :SearchText || '%'"
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I've been looking around for some ideas or code for encrypting data like email addresses in c# for my MVC project.
I wrote some code in vb about 8 years back, wanted to beef it up this time, perhaps go 512K or higher. Cryptography is not one of my strong points. But I'm looking for suggestions on something rock solid.
The code I wrote is DES, guess I should go AES so I can use the Xeon CPU AES feature to make it faster, plus I'm now reading that DES is pretty unsecure.