|
User roles. But this question belongs in the WCF[^] forum.
David
|
|
|
|
|
User based authorization (in ASP.Net) should help you control method accessibility.
|
|
|
|
|
Hi All,
I have developed an application it is working fine in desktop/laptops systems. Now we need to make it to work in Mobile devices. I know little bit of Jquery core. I created a sample page using Jquery Mobile plugin and it is changing the size/width of the page automatically. But when I browse the same page in desktop browser it is not looking good. Means the page width is increased blob blob.....
I want to make the existing site to work in Mobile devices? How can i do that.? I googled but not got proper solution to my problem.
|
|
|
|
|
There is no easy way.
If you used latest web technologies (Html5), your site should open up in the mobile browser.
However, there might be layout issues which you will need to address.
|
|
|
|
|
How to get a data from database by using forms and updatepanel
|
|
|
|
|
Start by reading a book on asp.net
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
There is a lot of code to do this. You'll want to study ADO.Net or look into other ASP.Net frameworks, MVC, for example.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Agree with other guys. Education Needed[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
I assume you mean something like ListView or DetailView, as an UpdatePanel is simply a tool used for partial page updates.
http://msdn.microsoft.com/en-us/library/bb399001.aspx[^]
For ListViews, GridViews and DetailViews...
You can start by adding a a DataSource to your web form. Visual Studio makes this step easy and you can simply drag a template from the Data section of your tool box.
Visual studio will provide a basic walk-through to help you configure your data source and create a new connection string in web.config.
Once you have successfully created your new Data Source, you can choose this as the Data Source for your Object and the the data should populate accordingly.
You could also insert one of the above data tools within an update panel as well.
You can simply place the Gridview (or other data object) within the realms of the UpdatePanel and get a partial page load with the data is resolved.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
// Data Object Here
// Data Object's Data Source
</ContentTemplate>
</asp:UpdatePanel>
|
|
|
|
|
I am using HTML Virtual Keyboard Interface Script - v1.49 in our asp.net c# project for tamil keyboard. It is working perfect, but when I saved the textbox value into sql server 2005 database it is stored as small squares or question marks. I used nvarchar data type for that field. Please help me, I am in very critical position.
Regards
|
|
|
|
|
It's normal for non printable chars and unicode to show as squares like CR and CRLF. It doesn't mean that the data is wrong or malformed unless you can prove it.
If you want to see all the data, try blob or something that shows the whole character set.
Or you may have to encode on write and decode the data on read.
Here's something to get you started on what to search for
[^]
|
|
|
|
|
Take a look at Thatja's solution[^].
I found this with a simple search query on Google, try doing some research before asking a question.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I have a radio button list control on my ASP.NET web form for selecting the payment method (Credit Card, Cheque or Cash),
And a credit card detail submission area for entering the credit card details if the user chose Credit Card as the payment method.
The credit card detail entering area has a radio button list control for selecting Credit Card type (AMEX, Master or VISA), a text box for entering the credit card number and a drop down list for selecting the credit card expiry month as shown below
<asp:RadioButtonList ID="rdPaymentMethod" runat="server">
<asp:ListItem Value="CC"> Credit Card</asp:ListItem>
<asp:ListItem Value="Cheque"> Cheque</asp:ListItem>
<asp:ListItem Value="Cash"> Cash / Other</asp:ListItem>
</asp:RadioButtonList>
<asp:RadioButtonList ID="rdCCType" runat="server">
<asp:ListItem Value="AMEX"> American Express</asp:ListItem>
<asp:ListItem Value="Master"> Master Card</asp:ListItem>
<asp:ListItem Value="VISA"> VISA</asp:ListItem>
</asp:RadioButtonList>
<asp:TextBox ID="txtCCNumber" runat="server"></asp:TextBox>
<asp:DropDownList ID="ddlCCExpiryMonth" runat="server">
<asp:ListItem Selected="True">Month</asp:ListItem>
<asp:ListItem Value="01">01</asp:ListItem>
<asp:ListItem Value="02">02</asp:ListItem>
<asp:ListItem Value="03">03</asp:ListItem>
<asp:ListItem Value="04">04</asp:ListItem>
<asp:ListItem Value="05">05</asp:ListItem>
<asp:ListItem Value="06">06</asp:ListItem>
<asp:ListItem Value="07">07</asp:ListItem>
<asp:ListItem Value="08">08</asp:ListItem>
<asp:ListItem Value="09">09</asp:ListItem>
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="11">11</asp:ListItem>
<asp:ListItem Value="12">12</asp:ListItem>
</asp:DropDownList>
I am trying to validate my webform so that,
IF and ONLY IF the user select the first option (Credit Card) for payment type,
Then the user must ALSO select the credit card type (rdCCType), then enter credit card number (txtCCNumber) and also select credit card expiry month (ddlCCExpiryMonth)
I have absolutely no idea how to accomplish this and where to start.
Please show me how to do this using ASP.NET validation controls.
Thank you.
|
|
|
|
|
|
you can make the validation group in every radio button and also with in Drop down list.
IF you when submit button click check the every validation group, if any validation throw false your button not working.
I hope Validation Group help solve your problem.
|
|
|
|
|
Hello friends! Please I need your help over this issue. I have asp.net application using sql as backend. In my database, I have two fields(authorName and txtbkTitle) In this application, authors can insert as many textbooks as they want into the database provided the authors name remains unchanged (i.e if John Kyle is an author, all the textbooks he will save, will have John Kyle as their author's name). I know how to search the database for a specific textbook but this is not the way I want it. What I want is that, when the author enter his/her name, all textbooks written by that author should be displayed and bind to datalist control leaving the other authors textbooks behind. Sample codes, links will be welcome. Thanks in advance!!!
|
|
|
|
|
You need to decide when you are going to start looking for the books, after the first character, after 2 or 3 characters or when the user presses the search button.
The search requires a round trip to the database and the volume returned will cause a delay, depends on your database size.
Your query would probably look something like
Select ID,Title,FirstName, Surname from vwBookAuthor where Surname like 'K%' or FirstName like 'K%'
Once you have that from the database you simply filter it in your codebehind or pass the list to the client and filter it based on further input. If the latency on 1 character is too big then wait for 2 or 3 characters to begin the search.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Mycroft, your reply was helpful. But it only retrieved one record, and I suggest that if I can bind the results found to a datalist, then everything will display. This is what I have tried so far:
Dim cn As new SqlDatasource
Sub Connect()
Try
If cn.State = Data.ConnectionState.Open Then cn.Close()
cn.ConnectionString =ConfigurationManager.ConnectionStrings("infoConnectionString").ConnectionString
cn.Open()
Catch ex As Exception
End Try
End Sub
Protected Sub btnlogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Connect()
Dim cmd As New SqlCommand
cmd.Connection = cn
cmd.CommandText = "select * from Bkstbl where Author like txtauthor.Text and Password=@Password
cmd.Parameters.AddWithValue("@author", txtauthor.Text)
cmd.Parameters.AddWithValue("@Password",txtpassword.Text)
Dim dr As SqlDataReader = cmd.ExecuteReader cmd.Parameters.Clear()
If dr.HasRows = True Then
'the aim of this code is to display only the textbooks written by the author
Datalist1.DataSource=dr("Txtbooks")
Datalist1.DataBind
dr.Close()
Else
dr.Close()
Msgbox("Invalid author name or password")
End If
End If
when I clicked on the search button, an error will show. This is the error that shown: InvalidOperationException unhandled user code.
For futher explanation, what I want is; taking for example John has 10 textbooks and James has 6 textbooks stored in database, when John wants to retrieve his textbooks from database, only his textbooks should display on the datalist excluding James textbooks(note: all textbooks saved by John, will have the same author name). Sorry if the request is too big, but please help me out, I am stuck...
|
|
|
|
|
Your question indicates a complete lack of knowledge of SQL. I suggest you get a book on SQL or at least some tutorials and work through them to get a basic grounding on the subject otherwise you are going to spend all your time on forums asking simple questions that a little learning will solve for you.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes Mycoft, you were right. I don't have to ask questions on forum all the time. But guess what, I congratulate you for saying something that got me thinking and now, I'm proud to generate my own six lines of code to search and display all records of a specific query. Guess what again, this time, I did it on my own without any search or reading of books. Once again, thanks alot!!! But one more thing and I hope you will tell me this time because I have tried but couldn't figure it out. My connection string is Data source=Emmanuel\Okugbe;Initial Catalog=info; user ID=sa; Password=pwd"
when I copied this application to another system, there was build error. Now the question is, how can I modify my web.config and my datasource(connection string) so that it can run in all systems without making any changes in that system? Please help!!!
|
|
|
|
|
Yeap, I got it. Thanks Holmes
|
|
|
|
|
For instance for a HTML control:
<img id="img1" src="Images/.../1.jpg" alt="Tile #1" />
How to catch up the img1 in C# code (e.g. img1.src = "xxx";)? Thanks if you can provide your hint.
|
|
|
|
|
|
I want to catch up the control in C# (e.g. image1.src = "xxxx";). Thanks.
|
|
|
|
|
Member 10447319 wrote: I want to catch up the control in C# (e.g. image1.src = "xxxx";). That link also with C# code, Re-check.
|
|
|
|