User Controls And Sqldatasource
Nov 19, 2007
I created a user control file with 3 properties. I would like to call this user control in a datalist control in the hosting page and pass the properties from a sqldatasource control. To this end I have a code like below;
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [1], [2], [3] FROM [table1]">
</asp:SqlDataSource>
<asp:DataList ID="DataList1" runat="server"
DataSourceID="SqlDataSource1"
DataMember="DefaultView" >
<ItemTemplate>
<uc:kk ID="kk1" runat="server"
One='<%# Eval("1") %>'
Two='<%# Eval("2") %>'
Three='<%# Eval("3") %>' /></ItemTemplate>
</asp:DataList> I don't get any errors when I run the page, however it won't work as I wish. Only thing that appears in the rows of datalist is "01.01.0001 00:00:00".
View 4 Replies
ADVERTISEMENT
May 9, 2007
Hi, I am porting a massive VB6 project to ASP.net 2005. Most of the code is fine, however because the original developers used lots of data controls and my own time restrictions I thought to replicate the functionality by using Sqldatasource controls instead.
These data controls are bound to DBtruegrids. The project has has lots of code like...
AdodcOrders.Recordset.RecordCount > 0 or If AdodcOrders.Recordset.EOF or AdodcOrders.Recordset.MoveNext() or
AdodcDetail.Recordset!FieldName
The problem is the sqldatasource control doesn't have a recordset/dataset property which I can access and manipulate, or does it? What should I do to get round these? The project has thousands of lines like this in so its not feasible to rewrite it (although if I could I would!).
Any suggestions please gratefully appreciated.
many thanks
mike
View 1 Replies
View Related
Mar 4, 2007
NET 2.0
I am using Visual Studio Express 2005 for database web developement.
I have created a database with 5 tables. Two are associative tables.
They are
SoftwarePK SoftwareID Title
SoftwareSolutionFK SoftwareIDFK SolutionID
SolutionPK SolutionID Title
CategorySolutionFK CategoryFK Solution
Category
PK Category Title
Criteria for a search with three sources of input into a SqlDataSource attached to a FormView for paged out.
The following are the Search Criteria input sources:1) ListBox in Multiple Selection Mode2) CheckBoxList with Mutiple checks posible2) TextBox with key word search in Title.
Each Solution has 0 or many Categories and 0 or many Software.
When the records are entered in the database, the associative information for Categories and Software are populated to filter thereturned values.
In NET 1.1, I would create a search string like the following in code behind by looping through the CheckBoxList and ListBox finally adding the TextBox:
SELECT Solution.SolutionID, Solution.Title FROM SolutionWHERE Solution.SolutionID IN ('2','3','5') AND Solution.Title LIKE '%Math%'
I am unable to update the SelectCommand in the ASPX page.
However, when I use the I have used theSystem.Web.UI.WebControls.SqlDataSources"SelectQuery Builder"I receive the following in the Source for ASPX: <asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT Solution.SolutionID, Solution.Title
FROM
Solution INNER JOIN CategorySolution ON Solution.SolutionID = CategorySolution.SolutionID
INNER JOIN SoftwareSolution ON Solution.SolutionID = SoftwareSolution.SolutionID">
<SelectParameters>
<asp:ControlParameter ControlID="CheckBoxList1" DefaultValue="%" Name="CategoryID" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="ListBox1" DefaultValue="%" Name="SoftwareID" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="txtTitleSearch" DefaultValue="%" Name="Title" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource> I receive duplicate records and not sure if the code generated accesses the Mutiple Selected values in the CheckBoxList1 and ListBox1.Question: 1) If the SelectQuery generator will not access multiple selected values from the CheckBoxList1, how can I use code behind to replaceSelectCommand in the ASPX page?2) What is the best solution for using the CheckBoxList1, ListBox1, and TextBox for filtering my results? Sample code, references to solutions, corrections on logic, a new approach, how to use the wizard correctly would all be greatly appreciated.3) Can Multiple Selection Controls be use with a SqlDataSource SELECT Command?Thanks for your time,Sincerely,Unhistoric
View 2 Replies
View Related
Jun 8, 2007
Thanks for your help.
I'm just getting into ASP.NET 2.0 and started using the SqlDataSource control to declaritively connect to a database. I was wondering if I have two SqlDataSource controls on one page with two select commands querying the same database, will the that create to seperate instances of opening and closing the connection to the database, or will it open the database once, execute both queries, and then close the connection. It seems that if it creates two separate connections, it would still be more efficient to to connect to the database programmatically using ADO.NET. You would only need to make one trip to the database, pull down all of your data, and then close the connection.
Adrian
View 1 Replies
View Related
May 9, 2008
hello friends iam newlly joined in to company any one can help me how to bind individual controls to a single SqlDataSource Control..
my problem is "i have different text boxes and dropdown boxes and what i want to do is if i enter primary ker field(employeeno) in the text box automatically i need to get that particular record and i need to populate it to the Respective controls...
is there any chance of doing this by using a single datasource control..
pls help me its urgent
Regards
k.seshu
View 3 Replies
View Related
Jun 30, 2007
All,
My ISP does not allow me to remotely connect to my hosted SQL Server DB--how can I use SQLDataSource and other data bound controls in development?
Here are my specs:
IDE: Visual Web Developer Express 2005
Database: MS SQL Server
ASP Version: ASP.NET 2.0
The SQL Server is hosted centrally at the ISP; basically I have been given the connection string parameters.
My question is this:
Do I use two web.config files (one for when I develop locally and one for when I deploy remotely)? If so, how? Will the SQLDataSource control find the connection string defined in web.config on the remote server? I don't want to have to write all of the database code and it would be a big loss of one of the major benefits of using ASP.NET 2.0 if I do.
Any help will be greatly appreciated,
Leslie
View 4 Replies
View Related
Nov 21, 2006
Hi all,
I have a gridview bound with a SQLDataSource. I am using the Update feature of the SQLDataSource to update a SQL Server database with values entered into the gridview. However I am not getting it to work. I believe this is due to the controls that contain the user entries are not the gridview itself, but rather child controls within the gridview. I have been using the names of the actual controls but nothing happens. Upon submit, the screen returns blank, and the database is not updated. Here is some code:
<asp:GridView ID="GridEditSettlement" runat="server" AutoGenerateColumns="False" BackColor="Navy"
BorderColor="IndianRed" BorderStyle="Solid" Font-Names="Verdana" Font-Size="X-Small" DataSourceID="SqlDataSource_grid" AllowPaging="True" AllowSorting="True" ForeColor="White" DataKeyNames="legid">
<Columns>
<asp:CommandField ShowEditButton="True" CancelImageUrl="~/App_Graphics/quit.gif" CancelText="" EditImageUrl="~/App_Graphics/EditGrid.GIF" EditText="" UpdateImageUrl="~/App_Graphics/save.gif" UpdateText="" ButtonType="Image" />
<asp:BoundField DataField="StartDate" HeaderText="Start Date" ReadOnly="True" />
<asp:BoundField DataField="EndDate" HeaderText="End Date" ReadOnly="True" />
<asp:BoundField DataField="CounterpartDealRef" HeaderText="CP Deal Ref" ReadOnly="True" />
<asp:TemplateField HeaderText="Preliminary Settlement Price" ><ItemTemplate>
<asp:Label ID=lblPreliminary runat=server Text='<%# Bind("PrimarySettlementPrice") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID=txtPrimaryPrice Text='<%# Bind("PrimarySettlementPrice") %>'></asp:TextBox>
</EditItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="Agreed Settlement Price"><ItemTemplate>
<asp:Label ID=lblAgreed runat=server Text='<%# Bind("AgreedSettlementPrice") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID=txtAgreedPrice Text='<%# Bind("AgreedSettlementPrice") %>'></asp:TextBox>
</EditItemTemplate></asp:TemplateField>
<asp:BoundField DataField="Volume" HeaderText="Volume" ReadOnly="True" />
<asp:BoundField DataField="Price" HeaderText="Price" ReadOnly="True" />
<asp:BoundField DataField="TotalVolume" HeaderText="Total Volume" ReadOnly="True" />
<asp:BoundField DataField="InstrumentName" HeaderText="Instrument" ReadOnly="True" />
<asp:BoundField DataField="NominalValue" HeaderText="Nominal Value" ReadOnly="True" />
<asp:BoundField DataField="Strike" HeaderText="Strike" ReadOnly="True" />
<asp:BoundField DataField="DeliveryDate" HeaderText="Delivery Date" ReadOnly="True" />
<asp:TemplateField HeaderText="LegId" SortExpression="LegId">
<ItemTemplate>
<asp:Label ID="lblLegID" runat="server" Text='<%# Bind("LegId") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID=txtLegID Text='<%# Bind("LegId") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="#FFFF66" ForeColor="#333333" />
<EditRowStyle BackColor="#FFFF66" Font-Names="Verdana" Font-Size="X-Small" ForeColor="#333333" />
<PagerStyle ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#333333" />
</asp:GridView>
<br />
<asp:SqlDataSource ID="SqlDataSource_grid" runat="server" ConnectionString="<%$ ConnectionStrings:DealCaptureDev %>" SelectCommand="sp_get_single_deal" SelectCommandType="StoredProcedure" UpdateCommand="Update trDealLeg Set PrimarySettlementPrice=@primarysettlement, AgreedSettlementprice=@agreedsettlement, LastUpdate=GetDate(), LastUpdateBy=Session('userid') Where LegID=@legid" EnableCaching="True" ConflictDetection="CompareAllValues" ProviderName="System.Data.SqlClient">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="" Name="dealnum" QueryStringField="deal"
Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="txtLegId" PropertyName="Text" Name="legId" />
<asp:ControlParameter ControlID="txtPrimarySettlement" Name="primarysettlement" PropertyName="Text" />
<asp:ControlParameter ControlID="txtAgreedSettlement" Name="agreedsettlement" PropertyName="Text"/>
<asp:SessionParameter DefaultValue="" Name="userid" SessionField="userid" />
</UpdateParameters>
</asp:SqlDataSource>
As seen above, controls such as txtPrimarySettlement are referenced but the update is not successful. The text boxes are within the GridEditSettlement gridview. In the .aspx code I cannot use FindControl (at least I don't think it will work).
So the questions are: Is it possible to reference the child controls, if so - how? Is there another way to do this, such as in the vb code behind - in the either the gridview's RowUpdating event or the SQLDataSource's Updating event.
What is the best approach? Anyone come up against this issue before?
Thanks,
KB
View 1 Replies
View Related
May 10, 2006
I want to update two tables in one page. So I created two FormView bound on two SqlDataSource controls, and I create a Update button on the bottom of page. And I writen some codes as below:
btnUpate_Click(object sender, EventArgs e){
sqlDataSource1.Update();
sqlDateSource2.Update();}
But, the records haven't updated.
In SqlDataSource2_Updating() function, I found all the parameters is null.
So, how to modify my code to do it.
Zhang
View 2 Replies
View Related
Feb 20, 2007
is there a way that I can use the sqldatasource with a form view where my sqldatasource select statement is like this
select * from tblUsers where vcUserName=@vcUserName
<selectparameters>
<asp:Parameter Name="user.identity.name" Type="String />
</selectParameters>
View 1 Replies
View Related
Nov 20, 2007
I know that <asp:SqlDataSource> is fast, but is it a good practice to use this. The sqldatasource is right there in the aspx page and the SQL for sqldatasource is also right there.Does that not break the 3 tier model, as normally we call a database layer and we have all the SQL's there. In one of the code in saw the following. I don't know if it is a good practice to do something like this. <asp:DropDownList ID="CountryDropDownList" runat="server" DataSourceID="SqlDataSource2" DataTextField="PickListLabel" DataValueField="PickListValue" OnDataBound="hidePanel"> </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:webrepos %>" SelectCommand="SELECT [PickListLabel], [PicklistValue] FROM [PickList_Values] WHERE (([ObjectName] = @ObjectName) AND ([FieldName] = @FieldName)) ORDER BY [AbbrCode]"> <SelectParameters> <asp:Parameter DefaultValue="Account" Name="ObjectName" Type="String" /> <asp:Parameter DefaultValue="Country__c" Name="FieldName" Type="String" /> </SelectParameters> </asp:SqlDataSource>
View 5 Replies
View Related
Jan 5, 2006
After some help from the folks in the Security forum, I have some of the answer I need. Hopefully someone here can help me figure out the best method of using that information to find a final solution.
To start, here's a brief synapsis: I'm developing an App in ASP.NET 2.0, using forms-based authentication and the Login Control. I am able to login fine as far as I can tell, since I am able to proceed to the destinationURL without error. From there, I button click to the application in question. Here is where I have the problem.
I want to run a select query on a SQL table where a field = the current user's Username. I cannot find any examples of doing this. I have managed to figure out how to retrieve the current user's username via the Membership.GetUser method, but I can't seem to figure out how to apply that to my SqlDataSource Control and get a valid response.
a snippet of my control's code follows:
<script runat="server"> - This is run inline, not code-behindProtected memUser As MembershipUser
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)memUser = Membership.GetUser()End Sub</script>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SWGToolsetConnectionString %>"SelectCommand="SELECT [CharacterName] FROM [Characters] WHERE ([UserID] = '<% =Server.HtmlEncode(memUser.Username) %>')"></asp:SqlDataSource>
If anyone can tell me what I can or should be doing differently, I would appreciate it.
View 4 Replies
View Related
Jul 11, 2006
I am running into an issue trying to declaratively set up a SqlDataSource. I want to be able to filter some of my queries based on the user that is currently logged into the web site. I want to do it Declaratively as that's one of my favorite 2.0 features.Is there any way to do this with the Membership information? I know I can use the code behind to set the parameter, or store the User Name in Session Variable, and use a <asp:SessionParameter> but I think there should be a way to bind directly to the Membership user...Am I missing another option, or is there no built in way to do this? Any other suggestions...Thanks
View 1 Replies
View Related
Apr 18, 2007
I have a create user wizard. On the created user event. I am calling a datasource.insert to insert the email, userid, and opt in to newsletter option into another table.
For some reason it is inserting the value twice into the database. I have checked possibilities for why this might be happening. I am pulling my hair out.
Any ideas?
Andrew
View 7 Replies
View Related
Apr 21, 2007
Hi,How do I get hold of the HttpContext.Current.User.Identity.Name from within an sqldatasource? I want to create a WHERE clause that says WHERE UserName = @UserName and the @UserName parameter be filled with the current user name. I would be able to do this in code, but I don't know how to get at this information from within a datasource. At a guess I tried to use the Cookie option from the drop down list, and use the name of the FormsAuthentication Cookie, but this didn't work. Is there a way I can do this? If so how? I don't want to resort to using a hidden field or anything like that if I can help it. Many thanks, Steve
View 2 Replies
View Related
Jun 1, 2008
Just downloaded and installed the VS 2008 Express and created/tested some websites. I have done several aspx websites using VS 2005 during the last 2 years. Still I don't quite understand the details of coding the database connection and DataBing. For example, what does 'providerName',and Integrated Security really mean?Why in the Web.config file these are providerName="System.Data.SqlClient" and Integrated Security=True? Why in Default.aspxthere are both ntegrated Security=True;and USER ID=WEB; Password=webwebweb1". I know these may deal with the authentication mode of my SQL Serverdatabase.For the VS 2008 Express and SQL Server 2005 Express, I installed in my XP home PC, I used the file system websites, If I upgrade to XP Pro and install IIS web server, and use SQL Server 2005, what might be different? Jeffrey Web.config <connectionStrings> <add name="NorthwindConnectionString" connectionString="Data Source=D5MRY6G1SQLExpress;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>Default.aspx <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=D5MRY6G1SQLExpress;Initial Catalog=Northwind;Integrated Security=True; USER ID=WEB; Password=webwebweb1" ProviderName="<%$ ConnectionStrings:NorthwindConnectionString.ProviderName %>"MasterDetail.aspx <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
View 1 Replies
View Related
Oct 27, 2006
Hi, i'm very new to asp and i have a small question - If i have a control on my webpage, like "CurrentUser" (which is System.Web.UI.WebControls.LoginName), how can i use it in a query? I want a query which will return all records pertaining to the current user. If i was writing the query in normal SQL i would write the following: SELECT Date, JobID, EmployeeIDFROM TblTimeslotWHERE TblEmployee.EmployeeName = (The "CurrentUser" on the webpage) AND TblEmployee.EmployeeID = EmployeeID Thanks very much for your helpBen
View 1 Replies
View Related
Feb 12, 2007
Is it not possible to execute one package and then design another package? I am executing one package and trying to design another package and just have a grey window in the control tool box that says:
"there are no usable controls in this group. Drag an item onto this text to add it to the toolbar"
Can I only get my controls by dragging when another package is executing? Where do I drag them from?
Thanks,
Kayda
View 4 Replies
View Related
Jan 19, 2007
Hi all,
I am trying to develop a CustomReportItem similar to Matrix control. Is it possible to add some "OnClick" sort of events to a section of this CRI (As a drilldown button of matrix control allows to expand the respective column).
Please help me if there can be any solution.
View 5 Replies
View Related
Feb 1, 2007
This is pretty weird... any controls past the halfway horizontal point of the report get pushed into page 2. The leftmost control is not affected just those to the right of it. It's like there is an invisible tab after the leftmost control. Smaller (not leftmost controls) (not past the middle of the page) are also pushed way to the right (just not into a new page)
Is there some property (that I'm not aware of) that does this? It doesn't matter if I use textboxes or lines. I have not changed any of the default control properties. flow layout is still LTR.
In my current report I have questions and answers on separate lines...I can't place them next to each other or it screws up the pagination.
I start with a new report and it does not do this but as soon as I add 2-3 vertical pages (over 11' x 2) This starts happening.
Has anyone experienced this?
View 1 Replies
View Related
Jul 23, 2007
What is the C# code I use to do this?
I'm guessing it should be fairly simple, as there is only one row selected. I just need to pull out a specific field from that row and then insert that value into a different SqlDataSource.
View 7 Replies
View Related
Nov 14, 2007
Hello everyone, I'm trying to get a count of 3 different types on the same field. For Example, let's use Gender as the field with these options: Male, Female, Not Given. What I'm wanting to do is retrieve a count for each type. What I have so far is: SELECT COUNT(Gender) WHERE Gender = 'Male' and I have to duplicate this in 3 different data controls. I would like, however, to have one datasource control with a statement along the lines of: SELECT ( SELECT COUNT(Gender) FROM Users WHERE Gender='Male), SELECT COUNT(Gender) FROM Users WHERE Gender='Female', SELECT COUNT(Gender) WHERE Gender='NotGiven' ) From UsersOr something to that effect. Any suggestions?Thank you greatly for your help,Mark
View 2 Replies
View Related
May 14, 2008
Hello All,
I am recieving this error using vs2005. I am using the login controls which creates a mdf file. i am not using sql server 2005 in this program. The program runs well in my local machine, but as soon as i publish the site, i recieve this error after i login into the site.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
does anyone know why?
thank you,
kagome
View 9 Replies
View Related
Jan 9, 2004
Hello !
i am new to databases so i would be grateful for your help.
I am using SQL Server 2000 and vb to access and update the records of a database.
I want your opinion about the way i am displaying data.
I have created a form with textboxes etc. which display the fields
of the table.
Now when i load the form i populate a recordset with a
"select ... from... " query.
Then i manually
set
txtfield1.text=cstr(recordset.fields("field1").value)
etc...
If i want to update the table then i have to construct manually the
query.
"update ... set field1='"+ txtfield.text +"' "
if i want to move to a next record i do
recordset.movenext
and then
txtfield1.text=cstr(recordset.fields("field1").value)
again
Is that good or should i use bound controls ?
If multiple users access the same form at the same time (from different computers) will they be locked only when they save (update) data ?
Thank you !
View 4 Replies
View Related
Nov 5, 2007
Hi,
i want to create dynamic controls using wpf and c#.
can any body send me some code snippet.
for example:-
one of my window page have 100s of fields like textbox, checkbox and date controls in a group inside different grid and panel.
now if admin has made that amoung 100 fields user should be able to see only 20 or 30 fields.
how will i do so, just making the fileds invisible won't work, coz all the fields should be visible from top of the form,
means i want to push all the visible fields at the top.
what are the best way to do so.
need it urgent
thanx a lot
View 3 Replies
View Related
Aug 8, 2007
I am doing 350 controls as in a form like in reporting service . Due to so many controls the reporting sql server after deployment the preview and report must be slow. and i will checked the data transmission in stored procedure from sql server it will be faster.I am having doubt in controls in form will be slower.
Is there any suggestions without decrement the controls and to be report will be faster.
View 1 Replies
View Related
Jun 3, 2007
sir
i have uploaded my website but there is a problem
It is working very well wneh on the local host
but when uploaded on the web server the login control is not validating the users of the database
also i have added a CAPTCHA control
and that is giving an error that the cobe u entered is not matching
u can even check this error
My Url is http://www.webgrowthengine.com
click on the login button
user name: "aaaa" (Excluding the quotes)
password: !@#$%^& (Press shift+ 1234567)
plzhelp me
Nitin
View 1 Replies
View Related
May 13, 2007
Hi ... hope you can help.
I would like to use the Data Mining Web Controls which ship with the MSSQL2005 Beta 2. The installer (BetaAnalysisServicesSamples.MSI) is supposed to create a new virtual directory and should also create the DataMiningHTMLViewers.dll according to "ReadMe_Data_Mining_Web_Controls.rtf"
But the MSI only creates a few new directories with the source code and a deployment project (DMHTMLViewersSetup.vdproj) which won't open with VS2003. The solution apears to be for VS2005.
How do I install the Web Controls?
View 3 Replies
View Related
Jun 2, 2006
RS 2005
I have a matrix item in a report. It is only about 7cm in width in design mode but obviously explodes out to about 30cm in when the report is run as thats the way the query behind it works.
The problem is any control e.g. a chart placed above and to the right of the matrix in design mode gets pushed across to the end of the matrix's width when the report is run, which causes extra pages in the report.
Other controls placed directly above the matrix in design mode hold their position when the report is run, it is only those controls placed further right than the end of the matrix (and above the matrix) in design mode that get pushed across. Why is this, is there a way to fix it?
Thanks
N
View 3 Replies
View Related
Aug 12, 2007
After resolving all the installation and configuration related issues, I was able to deploy a couple of projects on my report server. I can see alll folders and reports listed inside the folders from http://<servername>/reports . All works fine except when I run a report, the http://<servername>/Reports/Pages/Report.aspx page does not render report.
This page displays View, Properties, History Subscriptions etc, menu items on the top section of the page. It also displays Home, My Subscriptions, Site Settings, Help etc. links on top right corner of the page. I can also see the bar that has "New subscription" button. But the problem starts from the section below that. It does NOT display the Report navigation bottons (like First page button, Next Page button, previous page button, Last page button, print button etc.) Appears that the icons images for these bottons are missing. And above all, the page does not render report.
IE browser status indicate the following error:
error:'HoevrImagectl161_ctl01_ctl01_ctl06_ctl01' is null or not an object.
The report renders fine via http://<servername>/ReportServer/Pages/ReportViewer.aspx
I may not have explained the problem well here however, if you are interested, I can email you the screenshot of Report.aspx to help you understand the problem.
Any help is appreciated!!!
View 6 Replies
View Related
Jan 15, 2007
When a ReportViewer control is used to access a report on a remote SQL Server database, on what ports does the communcation occur? Does the control communicate on on the SQL Server ports of 1433 and 1434 or does it communcate as a web service on port 80 (or 443 for HTPPS)?
View 1 Replies
View Related
Nov 3, 2006
Hi, i wrote a simple program to access a SQL Server 2005 DB and i use the following connection string: <connectionStrings>
<add name="Alunos" connectionString="Data Source=.;Initial Catalog=ALUNOS;integrated security=true"/>
<add name="Escola" connectionString="Data
Source=.SQLEXPRESS;Initial Catalog=Escola;integrated
security=true"/>
</connectionStrings> It all works fine.Then
i try to create a SQLDataSource object graphically and configure it.
when i choosethe instance and DBi choose Test Connection and it gives
the 'Named Pipes Provider , error 40'. I think i solves this problem
because i googled thisand found a lot of info and i did all that.But
the problem remains.Could it be the a security issue? with the user i´m using to access the DB?Some help on this would be very appreciated.ThanksSP
View 2 Replies
View Related
Nov 28, 2007
one of my webpages uses the following sql query to allow the user to search through the database and present the qualifying data in gridview:
SELECT * FROM [Table1] WHERE ([comments] LIKE '%' + ? + '%')
how could i expand this so that the user can also search through the database but instead by searching through another column such as [type]?
thanks in advance
View 11 Replies
View Related
Jun 11, 2006
Hi,
I use a filter on a dataview which has uniq rows. I need to bind several fields of the result filtered row to textboxes. Here the code :
protected void Page_Load(object sender, EventArgs e) { string id = Request.QueryString["id"];
if (PreviousPage != null) { SqlDataSource dsPrev = (SqlDataSource)PreviousPage.FindControl("SqlDataSource1");
DataView dv = (DataView)(dsPrev.Select(DataSourceSelectArguments.Empty)); dv.RowFilter = "dr_id='" + id + "' "; dv.RowStateFilter = DataViewRowState.CurrentRows;
txtFirstName.Text = // ??? FirstName Field
txtLastName.Text= // ??? LastName Field
txtAddress.Text= // ??? Address Field } }
I don't know which cod to put in those lines.
On the help of the dataView there is an example that use DataBindings. This example is in the DataView.RowFilter article:
Text1.DataBindings.Add("Text",view,"CompanyName");
The big problem is that I don't have a method or event call 'DataBindings'. I just have 'DataBind' method or dataBinding event and they both don't support the 'Add' method.
So how can I bound those controls to my filtered Dataview field value.
Thanks,
David
View 3 Replies
View Related