|
it won't work.
in order to use asp.net 4.0 you have to have VS 2010. I don't even think VS2008 has the ability to support .Net 4.0.
you can always download the free visual web developer and that will get asp.net 4.0 support.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
hi friends
i am using logincontrol to my login page and also Create User Wizard to register new users. I now need to know how to store the datas which i supply throught the create user wizard to be store in my sqlserver database.
any help plzzzzzzz..
K.Gayathri
|
|
|
|
|
|
Hi guys just signed up on Code Project after giving on my fail google skills.
What I want:
I am interested in creating a Datagrid that will load details from database (cust driver which is configured with ODBC alredy) I don't how many rows I am going to have it all depends on the table im going to connect to.
I can't use the Wizard to establish a database Connection with the database I get an error (CAT_table doesnt exit or something like that) But I have been able to connect to the database by hard coding a connection string in the code behind file. But I am NOT able to take control of DataGrid because I am clueless.
So I need a tutorial on how to connect to a database with hardcode with the DataGRID and be able to UPDATE/DELETE my data without having to Programming methods and etc I want to take advantage of the DataGrid.
Can I please get links to Tutorials? That show how to hardcode everything, video tutorial would be awesome.
I am looking forward to your guys assistance
Thanks
|
|
|
|
|
Welcome to Code Project, it can be a very useful resource, however, it can also be a very harsh place for people who don't put forth some effort or only want code given to them. That being said I find it difficult to believe you could not find anything useful in the 5,300,000 results[^] returned from Google when searching for "asp.net datagrid". Especially since the first result is "An Extensive Examination of the DataGrid Web Control"
No comment
|
|
|
|
|
Hey,
Yeah there is a bunch of examples but everything i found was dealing with the Wizzard or an example i didn't understand.
[^]
But I think thats my answer right there? See I found bunch like that just no explanation.I can't find any example that are not using the Wizzard with explanations.
|
|
|
|
|
Right now I am trying to get a detailsview control to update one record in the database. I am using the smallest version of the code so I can make certain the update will work before I add more code. Right now in the new application, I have the first webform page entered by the user, they click the next button and they are directed to the second webform page. When the user is directed to the second webform page, the detailsview control for one record will be displayed.
I want the record to update a record when the user clicks a button not contained within the detailsview control. However the update has not occurred. I have tried lots of different options but nothing has worked so far. For example, I read lots of sources that said I should not have a 'new' statement in the select. However if I leave out the 'new' part of the select statements, I get an error.
What you do think I should do, have a update statement in the in the linq data source, use 2 different linq data sources, what do you think I should try to do to to make the code work.
The following is my code so far:
<pre>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Support.AttDataContext"
Select="new (Att_id, Prior_Cutoff_Date)"
TableName="Attestations" Where="Att_id == @Att_id"
EnableUpdate="True">
<UpdateParameters>
<asp:SessionParameter Name="Att_id" SessionField="AttID" />
</UpdateParameters>
<WhereParameters>
<asp:SessionParameter Name="Att_id" SessionField="AttID" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" EnableModelValidation="False"
AutoGenerateRows="False" DataSourceID="LinqDataSource1" BorderStyle="Solid" HorizontalAlign="Center"
DefaultMode="Edit">
<Fields>
<asp:TemplateField HeaderText="Att ID">
<ItemTemplate>
<asp:TextBox ID="TextBoxAttid" runat="server" Text='<%# Eval("Att_id") %>'
BorderStyle="None"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Prior Cutoff Date" SortExpression="Prior_Cutoff_Date">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Prior_Cutoff_Date") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Prior_Cutoff_Date") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</Fields>
</asp:DetailsView>
protected void Button_Click(object sender, EventArgs e)
{
DetailsView1.DataBind();
}
</pre>
-- modified 17-Nov-11 17:19pm.
|
|
|
|
|
im very new to asp.net.
i develop a website for e-commerce..now i developing a page to display the statistic of the product that bought by costumer..
here is my database structure..
Table Product-ProductID,ProductName,Description
Table Transaction-TransactionID,User,ProductID,Quantity
-in table Transaction, i store the product that bought by user with user name and quantity.
-table product, store the information about product
-this is my data, assume Bag ProductID=1 and Pencil ProductID=2 in table transaction..
-for table transaction:
TransactionID | User | ProductID | Quantity
1 | ali | 1 | 2
1 | abu | 2 | 3
1 | qwe | 1 | 5
i want make a statistic about the product that bought by users..
im using this Select query= "SELECT Product.ProductName, COUNT(Transaction.ProductID) AS ProductCount FROM Product INNER JOIN Transaction ON Product.ProductID = Transaction.ProductID GROUP BY Product.ProductName"
when using this query the result is,
ProductName | ProductCount
Bag | 2
Pencil | 1
i just want my result shown like i stated below..but i dont know how to do it..
ProductName | ProductCount
Bag | 7
Pencil | 3
please help me....
|
|
|
|
|
Try this query instead:
SELECT DISTINCT Product.ProductName, SUM(Transaction.Quantity) AS ProductCount
FROM Product INNER JOIN Transaction ON Product.ProductID = Transaction.ProductID
GROUP BY Product.ProductName By using COUNT, you were counting the number of lines that corresponded in the result set, not the total.
|
|
|
|
|
just a note but next time don't format your whole question as code. I completely ignored your request because I didn't want to sort through your comments and your code.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
hi friends
i have a secure page(a page which is viewable after i login say page1.aspx) in page1.aspx i have a imagebutton. On the click of this image button i need to navigate to another page say page2.aspx which is also a secure page(this page is also viewed after i login but i have already loged in and viewed page1.aspx) so how to doit
so plz do help me in this issue
K.Gayathri
|
|
|
|
|
This is no different than navigating to any other page, secured or unsecured
No comment
|
|
|
|
|
hi
i am not able to navigate between secure pages(all kept inside a folder by name secure) as i have set in the web.config file inside the secure folder as follows:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization >
<deny users="?"/>
</authorization>
</system.web>
</configuration>
i have set so because no one should access these pages without logging in......plzzzzzzzzzzz do help me
K.Gayathri
|
|
|
|
|
If the user has already logged in then they have been authenticated and have access to any of the pages. How are trying to navigate?
No comment
|
|
|
|
|
hi
thanks for the reply
yes if the user is logged in he should be able to access the other secure pages now but since i have given
after login successfully the user enter a secure page say by using the code
Server.Transfer("~/Secure/Dashboard.aspx");
so now if i am in dashboard.aspx i have some more secure pages in the same secure folder which is accessible once the user is logged in and is in dashboard.aspx...so how to do it
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization >
<deny users="?"/>
</authorization>
</system.web>
</configuration>
it is redirecting to the login page itself
K.Gayathri
|
|
|
|
|
|
hi friend
i am using form authentication using sqlserver as my database and not web.config
so that part i am ok as i can compare the values from the database using my own code and getting redirection to a secure page
but my problem now is that
from that secure page how to move to other pages which are secure
K.Gayathri
|
|
|
|
|
Not using web.config? This makes no sense at since you have shown the web.config you are using. You can't use form auth without it. Good luck.
No comment
|
|
|
|
|
hi friend
i am using web.config file only
but i am comparing the values from the database and i am not using credentials ok....you got it now what i say
so after i validate from the database i enter a secured page and from that secured page i am not able to navigate to another secured page.....
hope you got me now
K.Gayathri
|
|
|
|
|
MalarGayu wrote: i am using form authentication using sqlserver as my database and not web.config so that part i am ok as i can compare the values from the database using my own code and getting redirection to a secure page
Your problem probable exists in how you are doing your authorization. It sounds like you are not using the default log-in and membership provider in asp.net by your statement above. Show us the code that you are using to log someone into your site.
|
|
|
|
|
I think this has been addressed in some capacity a few times, but nothing recently, and nothing that addresses my exact needs. So here goes...
I am looking for suggestions to accomplish the following in ASP.NET.
The Nutshell:
I need to take a string value, from a text box on a web form, and provide it in a PDF file for download. The PDF file will also include a static graphic.
The Details:
My thoughts right now are that I should probably start with something other than a PDF that contains the static graphic, add the text, and then convert to PDF. I thought this would be possible using MS Word, but understand that there are issues when doing this on a Windows 2008 Server - which is my environment.
Ideally, I'd like to avoid a 3rd party library or application unless it's free or very cheap. The project is just as small as it sounds and can't afford the overhead.
|
|
|
|
|
I guess the best way to do this is to create the page in HTML and then convert it to PDF.
There is a free tool here http://code.google.com/p/wkhtmltopdf/[^] but I have not used it myself with C# or so!
Sojaner!
|
|
|
|
|
Maybe you can try this...
itextsharp[]
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
I am using unobtrusive validation to validate a form. It works in most of the browsers - IE7, IE8 in compatibility mode, FF and Chrome. However, in IE8 stand-alone mode, it fires the validation and message is shown. When I go to the field and retype the value there, the browser hangs after the first key press. The error message is not automatically disappearing. This happens for all forms and for all types of validation attributes - Required, Remote or Regular expression.
I am using jquery 1.6.2 and jquery validation 1.9
Could anybody please help me ?
Many thanks,
Madhu
|
|
|
|
|
I will state what the user wants and then I will ask what control would be the best to accomplish this task.
The user wants a list of prepopulated fields for one row in a table. The user does not want me to leave some date fields as editable right off the bat. The user wants to be able to select yes from a droplist to indicate that a 'prepoplated date column value is invalid'. If the date field is incorrect, user want a dropdown field to display so they can enter the correct date.
The following are the options I am considering:
1. I am thinking that I would use a detailsview control. However I am wondering if one of these options are possible with a detailsview control?
a. Can that automatic dropdown field to enter a date possible with a detailsview control? If so, how would you accomplish this task? If not, could I use an accordion ajax control in the appropriate spot for the selected dropdown fields where the date needs to be entered?
b. Since the user wants all the date fields to be readonly initally, could I somehow disable the EditItemTemplate availability initially? When the user clicks on the control that says 'yes', the EditItemTemplate availability could be enabled and the user can change the value at that time only? If so, how would you accomplish this task?
2. If one of these options are not available in a detailsview control, could I accomplish my goal by using a formview control or possibly using a listview control using a single row being displayed? if this is an option, what control would I use and do you have references I can use on how to accomplish this goal?
3. If the above options are not available, the only think I can think to do is to embedded lots of individual standard we controls like a textbox, labeel, and dropdown list boxes within a large asp.net table control. I would then use accordion ajax control. However I do not want to use a big asp.net web table control since that is the 'old' style of coding.
|
|
|
|