|
When i developed application in asp.net i have used differnt validators.The question is if i use Example:textbox shd not be blank
I have used one requiredfieldvalidator
and in code behind like in
if
isdbnull(txt.text) or txt.text=""
msgbox("blank")
elseif....
end if
if i use both validators as well as validators it that cause application performance??
thistype of code occurs many times in the application.So please can any body give some answer.
And also "autopostback=true" property of some controls makes the server hits more.So at the user end appln becomes slow.What to do for this??But i have to set that property as per appln concern.
Please respond somebody for this question.
kissy
|
|
|
|
|
IF you are using required field validator for the textbox then i think there is no need of checking the textbox is empty or not .....
Do validations only once client side or server side (depends on the security of data).
Kissy16 wrote: But i have to set that property as per appln concern
As you said you need to change the things upon user interaction.
First question is that could you use javascript for the same ?
If yes then you can have some javascript function that will do the things that you are doing by postbacking the whole page ...
Another way AJAX but it is not going to make drastic changes.
So main conclusion is what you are doing at server side could you perform it at client side using javascript ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Kissy16 wrote: if
isdbnull(txt.text) or txt.text=""
msgbox("blank")
elseif....
end if
This is incorrect. In ASP.NET you can't display a message box as you do in windows applications. IsDbNull checks whether the value belongs to System.DbNull type. So you can't check the text box string in such a way.
When you use validators, always check the Page.IsValid property to make sure all validators are validated successfully.
If(Page.IsValid) Then
'Do your stuff
End If
Kissy16 wrote: And also "autopostback=true" property of some controls makes the server hits more.So at the user end appln becomes slow.What to do for this??But i have to set that property as per appln concern.
It will hit in the browser. You can't avoid that. But if you need to avoid page getting refreshed, use AJAX. But AJAX request also hits server. Also I don't think that it will be a big performance problem.
|
|
|
|
|
For example: Take a site like Lastminute.com when u search a list of result in a grid and bulk of data is coming from the database server. So it ll take time.. I need to place a waiting page in between the two pages...
Please help me. Urgent
Gopinath.R
|
|
|
|
|
Use Ajax
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I need some sample coding. please show that comes how. I want a loading page between two pages. I hope you know gmail like loading page. when i click the search button. immediately a loaing page should come. and then third page will show exactly after the data are retrieved from database server into server control like datagrid. Assume 50000 datas in a single page
Gopinath.R
|
|
|
|
|
Yes !!!
This can be done easily using Ajax.
Ajaxupdate panel will do for you !!!!
Try this link !!!
UpdateProgress Control Overview
[^]
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi to all
How to send mail through SQL Server using triggers
Thanks
|
|
|
|
|
|
What about SQL 2000? Thanks.
|
|
|
|
|
|
Hi,
I m using first time Ajax in my site so i don't know how to bind Cascading DropDown with database at run time?
Plz tell me the right way to do it
Thanks with anticipation
|
|
|
|
|
please look at once <a href="http://asp.net/ajax/ajaxcontroltoolkit/samples/">http://asp.net/ajax/ajaxcontroltoolkit/samples/</a>[<a href="http://asp.net/ajax/ajaxcontroltoolkit/samples/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
How change a Font Name ButtonClick() event.
|
|
|
|
|
Gagan Deep Garg wrote: How change a Font Name ButtonClick() event.
Which Font name do you want to change ? Only Button or any specifi Control !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
try this one ..... call this function with the 2 parameter .
Private Sub SetToolbarFont(ByVal FontName As String, ByVal FontSize As Integer)
Dim Temp As New Font(FontName, FontSize)
BtnAdd_Panel.Font = Temp
BtnSave_Panel.Font = Temp
End Sub
------------------------
Parameter1 = Font Name
Parameter2 = Font Size
mitesh
|
|
|
|
|
This following code i have used for windows form,
now same codei want to use for my web application,
In windows:
Dim boxIndex As Integer, lExst As Boolean
Dim box As ComboBox = sender 'Here i have to change as dropdown box if i change ,it will raise error as if condition place that i have mentioned bold letters..,Plzany one tell me this one
Dim txt As String = box.Text
Dim posCursor As Integer = box.SelectionStart
' If Cursor does not stay on the beginning of text box.
If posCursor <> 0 Then
lExst = False
' Go in cycle through the combo box list to find the appropriate entry in the list
For boxIndex = 0 To box.Items.Count - 1
If UCase(Mid(box.Items(boxIndex), 1, posCursor)) = _
UCase(Mid(txt, 1, posCursor)) Then box.Text = box.Items(boxIndex)
box.SelectionStart = posCursor
lExst = True
Exit For
End If
Next
' We didn't find appropriate entry and return previous value to text box
If Not lExst Then
box.Text = Mid(txt, 1, posCursor - 1) + Mid(txt, posCursor + 1)
box.SelectionStart = posCursor - 1
End If
End If
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
HMagesh wrote: This following code i have used for windows form,
now same codei want to use for my web application,
This is a sure sign that you don't really understand what ASP.NET is and what it does. I recommend buying a beginners book and reading it. You cannot reuse winforms code in a web app.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi im just binding all my records in dropdownlist control,
It have lot of records,
In dropdown to scroll and see its very difficult for enduser...,
So i like to give auto fill in that,
when i type in one textbox it have to be fill auto values in that.
same time in value field the selected item value want to be there,
how to do that?,
For example:
one student name "Magesh" and his id "101"
If i type in that Ma then it have to show all the names start from "Ma"...,
And if i select "magesh", in that person id(101) have to store in value field,
I need ur helps,
plz help me
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
There's a control in the ASP.NET AJAX library that does that.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi.....
I am doing a project in ASP.net....we need to communicate between two ASP.Net projects....Give me a sample code for the same...
Please reply as soon as possible....
|
|
|
|
|
Soundari wrote: Please reply as soon as possible....
When you're paying, you can set deadlines.
Your ASP.NET pages don't even exist unless someone is looking at them. There's really no way for two ASP.NET projects to communicate, unless they live on the same server, and use a database or something else to leave messages to each other.
What are you trying to do exactly ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello everyone,
I need some help in a bad way so I am turning to you experts!
Here’s some background I will try not to bore you. I am working on my first solo project out of school. I am writing an ASP.Net application in C# to replace a forms ordering software we use in my current printing position. The ordering software I am replacing went down 3 weeks ago and the outside vendor is struggling to get it back up and running. I am hoping to get my application done this weekend and start testing as soon as we can next week so we have something to work with and stop the chaos and maybe even land me a job with the new skill set. The Senior Web Developer where I work has agreed to let me write this and he will put it on out Intranet but I do not have access to resources like Active Directory.
I have just about all of the application written but I am struggling with the user login. I can grab the user windows logon when they come to the web page but then I need to authenticate that against a SQL database of users which I already have created. I wanted to use a membership provider (which was sweet) but I can not find an easy way to import / insert the 500+ users into the two different tables. Everything I read on the membership said it was easy to customize this for your own data store but after 3 days of search and reading I am not having any luck! I know this has to be fairly simple as it is done so much but I sure am having a hard time finding what I need.
So I am looking for the easiest way to wrap up the authentication. I am not sure what would be easier:
1) To customize the membership provider to use my current SQL database?
2) Import the current users into the two membership provider tables?
3) Or just authenticate against my current SQL Users database?
If you could please provide some code with your suggestions it would be very much appreciated.
I hope all this make sense I am beat it has been a long and trying week.
Thanks in advance for your help!
Kurt
Update: I forgot to mention I was using Forms Authentication.
modified on Friday, February 22, 2008 10:28 PM
|
|
|
|
|
Hi,
i have uploaded my sit to web server goddady.com
i have a button to download dyanmically generated excel file.This button is ajax enabled.....When i am click on this button it will popup a message like
"That assembly does not allow partially trusted callers"
This is my web.config file Please help me on this issue?
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
</appSettings>
<connectionStrings/>
<system.web>
<compilation debug="false">
<assemblies>
<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</buildProviders>
</compilation>
<authentication mode="Windows"/>
<pages styleSheetTheme="Smoke">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<customErrors mode="Off" defaultRedirect="Error.aspx">
</customErrors>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<identity impersonate="true" />
</system.web>
<system.web.extensions>
<scripting>
<webServices>
</webServices>
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>
</configuration>
modified on Friday, February 22, 2008 11:16 PM
|
|
|
|
|
Try using the Ignore HTML tags in this message (good for code snippets) checkbox
only two letters away from being an asset
|
|
|
|
|