Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: adding two datatables..columnwisememberJasmine250116 May '13 - 5:36 
Keep in mind that I get an email copy of your comments even if you delete them later. I'm just trying to help you get better answers. Whenever you post a question, please read it carefully before posting, to make sure you've given the information needed to answer the question completely.
 
When working with GridView object, it can be tricky to get values from the data - much better to get those from the underlying dataset itself. But, you can sometimes get it this way...
 
(because it's zero-indexed, this would be the third cell from the left)
myGridView.Rows[myRowIndex].Cells[2];
 
The problem is, the object living at that reference is a "TableCell" object, and you'll have to extract the data value out of there somehow. Remember, the GridView is the VISUAL object, not the data object. The best way to find data when the user clicks on a row in a GridView is to use the primary key and go back to the original DataSet which is bound to the control.
QuestionLog in ASP.NETmemberduong ba phuc13 May '13 - 16:39 
I have a web application. I want to know user doing in this?
And I can save it by session.
Can you tell your opinion?
QuestionRe: Log in ASP.NETmvpSandeep Mewara13 May '13 - 19:04 
Your question is not quite clear. Please rephrase and elaborate on what are you trying to do.
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

AnswerRe: Log in ASP.NETmemberduong ba phuc13 May '13 - 20:30 
I want to record all users' activities on websites such as manipulation 1 log file
SuggestionRe: Log in ASP.NETmemberBikash Prakash Dash13 May '13 - 19:07 
Quote:
I want to know user doing in this?
And I can save it by session.

What does it mean?
GeneralRe: Log in ASP.NETmemberduong ba phuc13 May '13 - 20:30 
I want to record all users' activities on websites such as manipulation 1 log file
GeneralRe: Log in ASP.NETmemberBikash Prakash Dash13 May '13 - 20:37 
So wots problem
Create a database table to store activities
at every operation store the activity along with date time, user, and any other things u require.
GeneralRe: Log in ASP.NETmemberduong ba phuc14 May '13 - 2:22 
Thank you!
GeneralRe: Log in ASP.NETprofessionalVani Kulkarni13 May '13 - 22:38 
Take a look at following link in CP, hope it helps:
User Activity Log in asp.net[^]
Thanks & Regards,
Vani Kulkarni

GeneralRe: Log in ASP.NETmemberduong ba phuc14 May '13 - 2:23 
Thank you!
AnswerRe: Log in ASP.NETmemberryanb3114 May '13 - 7:54 
Use FormsAuthentication and then just store whatever you want into the Session.
There are only 10 types of people in the world, those who understand binary and those who don't.

GeneralRe: Log in ASP.NETmemberduong ba phuc14 May '13 - 14:07 
Thank you! Smile | :)
GeneralRe: Log in ASP.NETmemberryanb3114 May '13 - 14:34 
No problem.
There are only 10 types of people in the world, those who understand binary and those who don't.

QuestionHow do I clear the server cache in asp.net?memberXarzu13 May '13 - 13:33 
How do I clear the server cache in asp.net? I have found out that there are two kinds of cache. There is the browser cache and the server cache. I have done some searching but I have yet to find a clear, step-by-step guide for clearing the server cache using asp.net (or not).
 
I am working on an ASP.NET c# application that uses a 3rd party CMS.   I have reason to believe that a bug I am having must have something to do with the cache on the server side.   As an admin of the CMS, I have used some controls that individual users can see but they should not.   The customer service has suggested I need to clear the server cache.
 
I can remote to the server.   Do I need to clear the cache from there?
 
I did a search on google.   So far, the only information I have is confirmation that there is such a thing as a cache on the server that differes from the client cache on the browser.   The first results from Google are from wikipedia and instruct users of using a url addition to clear the cache on the server.   I am not sure if that will work for what I need to do.  
 
I wish I could find some sort of ASP.NET C# sample code that will clear the server cache.
AnswerRe: How do I clear the server cache in asp.net?memberdusty_dex13 May '13 - 14:28 
A bit of googling came up with configreference/system.webserver/caching. With sample code in all .net languages.
 
No mention of clearing existing cache content.


Questionhow to access counter in for loopgroupmehdi.sabet13 May '13 - 10:17 
hi to all
how can i acceess 'i' in for loop
thanks in advance
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form runat="server">
        <div>
            <asp:DropDownList ID="aspMySelect" runat="server" OnSelectedIndexChanged="aspMySelect_SelectedIndexChanged" AutoPostBack="True">
            </asp:DropDownList>
 
            <asp:TextBox ID="aspNewOption" runat="server"></asp:TextBox>
            <asp:Button ID="Button1" OnClientClick="addAspPopUp()" runat="server" Text="Button" />
            <script type="text/javascript">
                function addAspPopUp() {
                    debugger
                    var optionText = document.getElementById('aspNewOption').value;
                    var textBox = document.getElementById('aspNewOption');
                    var objSelect = document.getElementById('aspMySelect');
                    
                    listCount=<%=objListItems.Count%>;
                    for (var i=0;i<=listCount;i++)
                    {
                        objSelect[objSelect.length] = new Option('<%=objListItems[i]%>');
                       
                        textBox.value = "";
                    }
                }
            </script>
            <input type="button" id="btnRegister" onclick="ConvertDate()" value="test" />
            <input type="button" id="Button2" onclick="addAspPopUp()" value="test2" />
        </div>
        <asp:Label ID="lbltest" runat="server"></asp:Label>
    </form>
</body>
</html>
 


QuestionRe: how to access counter in for loopmemberryanb3114 May '13 - 7:55 
What do you mean how to access i? Just use it. And why post so much other code that is not relevant?
There are only 10 types of people in the world, those who understand binary and those who don't.

Questionhow to add difftent item to a dropdown in each row of grid viewgroupmehdi.sabet13 May '13 - 3:26 
hi to all
i have a grid view with a drowpdownfield
i want to add diffrent item for each row to this drop down .
how can i do this
thanks for any help
AnswerRe: how to add difftent item to a dropdown in each row of grid viewmemberdusty_dex13 May '13 - 3:39 
It is usually good to post some code with your message. You are more likely to get help that way.
 
Far too many people just ask for code and don't even try to write any code themselves. Frown | :(


GeneralRe: how to add difftent item to a dropdown in each row of grid viewgroupmehdi.sabet13 May '13 - 3:44 
but my question is very obvious .
i want just an idea to do this
GeneralRe: how to add difftent item to a dropdown in each row of grid viewmemberBikash Prakash Dash13 May '13 - 3:43 
how much hav u done post your code?
GeneralRe: how to add difftent item to a dropdown in each row of grid viewgroupmehdi.sabet13 May '13 - 3:45 
but my question is very obvious .
i want just an idea to do this
SuggestionRe: how to add difftent item to a dropdown in each row of grid viewmemberBikash Prakash Dash13 May '13 - 3:51 
many ways you can items to grid view
you can use
XML data
Database data
Manual Adding
 
Which procedure you will prefer.
GeneralRe: how to add difftent item to a dropdown in each row of grid viewgroupmehdi.sabet13 May '13 - 3:53 
ok but
i want to add different item for each row to drop down
my problem is this
GeneralRe: how to add difftent item to a dropdown in each row of grid viewmemberdusty_dex13 May '13 - 5:14 
See if the Sample links on this ^ page help you. We can't help you because your explanation just isn't understood.
 
You should try Google more often. Wink | ;)


AnswerRe: how to add difftent item to a dropdown in each row of grid viewmemberdusty_dex13 May '13 - 3:48 
mehdi.sabet wrote:
i have a grid view with a drowpdownfield

 
If you have it let us see it. Wink | ;)


QuestionDisplaying Datamembernagesh2113 May '13 - 0:37 
Please help me to do this operations by using Asp.Net

1.Several screens (or one very functional one) to view the data in a variety of ways like by Phase, by ESXHost, by Application.
I think if we have several drop downs for filtering then that would work; so I can choose Phase 1, to show only the databases that will be migrated in Phase 1, then I can choose some other criteria and the screen shows a subset of data etc.
2. The Pre-requisites and Post-Migration checks should show whether the Phase or database migration is ready to start or is ok to complete.
QuestionMVC - request denied where the query string is too long - RESOLVED [modified]memberAndy_L_J11 May '13 - 15:21 
Apologies in advance for the long post. I am getting the following error in my MVC app:
 

HTTP Error 404.15 - Not Found
 
The request filtering module is configured to deny a request where the query string is too long.

 
Here is my code:
 
  public class MailHelper
  {
    public string To { get; set; }
    public string From { get; set; }
    public string Subject { get; set; }
    public string Message { get; set; }
    public string ImageUrl { get; set; }
   
    public MaiHelper() {}
 
    public bool IsValid()
    {
      return !(EmailDate == null) && !(string.IsNullOrEmpty(To)) &&
		!(string.IsNullOrEmpty(From)) && !(string.IsNullOrEmpty(Subject)) &&
		!(string.IsNullOrEmpty(Message)) && !(string.IsNullOrEmpty(BannerUrl));
    }
 
  }
 
// Mail Controller...
  public ActionResult Index()
  {
    MailHelper mH = New MailHelper();
    mH.EmailDate = DateTime.UtcNow;
    mh.From = "some@adress.com";
    
    return View(mH);
  }
 
 
I am using an external jQuery library ckeditor to get RTB functionality in my Razor page:.
 
  /*Index.cshtml*/
  @Model Controllers.MailHelper
  @{
    Layout = null;
  }
  ...
 
  @using (Html.BeginForm("Send", "Mail", FormMethod.Get))
  {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    
    <fieldset>
    <legend>MailHelper</legend>
 
    <table style="width: 700px;">
    <tr>
    <th>Date</th>
    <td>@Html.EditorFor(model => model.EmailDate)
						@Html.ValidationMessageFor(model => model.EmailDate)</td>
				</tr>
				<tr>
					<th>To</th>
					<td>@Html.EditorFor(model => model.To)
						@Html.ValidationMessageFor(model => model.To)</td>
				</tr>
				<tr>
					<th>From</th>
					<td>@Html.EditorFor(model => model.From)
						@Html.ValidationMessageFor(model => model.From)</td>
				</tr>
				<tr>
					<th>Subject</th>
					<td>@Html.EditorFor(model => model.Subject)
						@Html.ValidationMessageFor(model => model.Subject)</td>
				</tr>
				<tr>
					<th>To</th>
					<td>@Html.TextAreaFor(model => model.Message, new { @class = "ckeditor", @id = "text-details" })
						@Html.ValidationMessageFor(model => model.Message)</td>
				</tr>
				<tr>
					<th>Banner Url</th>
					<td>@Html.EditorFor(model => model.BannerUrl)
						@Html.ValidationMessageFor(model => model.BannerUrl)</td>
				</tr>
			</table>
 
			<p>
				<input type="submit" value="Create" />
			</p>
		</fieldset>
  }
...
 
 
It seem that if the Message is too long in the MailHelper.Message field, an error is thrown from my Send method:
[ValidateInput(false)]
				public ActionResult Send(MailHelper mailHelper)
				{
					if (!mailHelper.IsValid())
					{
						return RedirectToAction("Index", "Mail", new { mH = mailHelper });
					}
					dynamic email = new Email("Example");  */Example.cshtml*/
					email.To = "johnstonandy@rocketmail.com";
					email.From = mailHelper.From;
					email.Subject = mailHelper.Subject;
					email.Message = mailHelper.Message;
					email.Banner = mailHelper.BannerUrl;
					email.Send();
 
					return RedirectToAction("Sent");
 
				}
 

I assume the error is caused because I am using the FormMethod.Get parameter. Can someone point this novice in the right direction?
 
I have looked at changing the requestFiltering/requestLimits in the config but to no avail.
 
Cheers
 
-- RESOLVED --
 
As I should have guessed (found out through more research), the solution was rather trivial:
 
0) Add HttpPost attribute to Send method.
1) Change formMethod to formMethod.Post in Index.cshtml.
I don't speak Idiot - please talk slowly and clearly
 
"I have sexdaily. I mean dyslexia. Fcuk!"
 
Driven to the arms of Heineken by the wife


modified 11 May '13 - 22:13.

Questionwhich IDE software is suitable for ASP.NET?memberramasubbu ram10 May '13 - 23:35 
which IDE software is suitable for ASP.NET?
 
am the beginner .i plan to learn about ASP.NET .But i dont know which one is good for my learn needs ?
 
i have
 
netbeans IDE
 
visual express 2010
 
visual studio 2005
 
sql server
 
can any one suggest me please ?
AnswerRe: which IDE software is suitable for ASP.NET?mvpRichard MacCutchan11 May '13 - 0:03 
The Web Developer edition of VS 2010 Express would be OK to get started.
Use the best guess

SuggestionRe: which IDE software is suitable for ASP.NET?memberBikash Prakash Dash11 May '13 - 4:29 
Visual Studio 2010 and SQL Server 2008 is best to start
And follow book
MS Press STEP By STEP Guide to asp.net.
QuestionHELP! Multiple apps on same websitememberianoseb10 May '13 - 6:19 
Hi!
I need to have multiple applications realized with VS2008 running on same Website
Applications are published on different subfolders
I don't need (if not necessary) to have webconfig on the root folder
i have different webconfig for each app stored in subfolder app
But when i try to run an apps i retrieve:
 
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

 
How can i solve this?
 
please Help!
QuestionRe: HELP! Multiple apps on same websitememberryanb3110 May '13 - 7:11 
Are each of the apps actual Applications in IIS?
There are only 10 types of people in the world, those who understand binary and those who don't.

AnswerRe: HELP! Multiple apps on same websitememberianoseb10 May '13 - 7:27 
hi! thank for answer
 
No apps are on web server
AnswerRe: HELP! Multiple apps on same websitememberryanb3110 May '13 - 7:28 
If they have web.configs you'll want to make them virtual applications in IIS. Also, you may be running into an issue where you have both .net 4.0 apps mixed in the same app pool as .net 2.0 apps. You'll want to separate them.
There are only 10 types of people in the world, those who understand binary and those who don't.

QuestionCreating Blogs Using Asp.net C#memberrajugourishetty9 May '13 - 22:48 
Is there any possible to create blog in blogspot.com using c# code.
AnswerRe: Creating Blogs Using Asp.net C#mvpRichard MacCutchan10 May '13 - 0:04 
Quite possibly, but you need to ask your question in the correct place[^].
Use the best guess

AnswerRe: Creating Blogs Using Asp.net C#memberryanb3110 May '13 - 7:13 
Yes, and I would recommend starting at http://code.blogger.com/2012/06/blogger-api-v3.html[^]
There are only 10 types of people in the world, those who understand binary and those who don't.

GeneralRe: Creating Blogs Using Asp.net C#memberrajugourishetty12 May '13 - 20:41 
Hi ryanb31,
 
Thanks for your reply.
 
I have gone through the link http://code.blogger.com/2012/06/blogger-api-v3.html. We are unable to create new blogs using this api. On created blogs only we can do some operations like (post/comment/reply).
 
Can you tell me by using which api can we create blogs and perform operations on it?
SuggestionRe: Creating Blogs Using Asp.net C#memberryanb3113 May '13 - 1:05 
I believe that is the only API so what you want may not be available then. I would recommend contacting them or asking in their forum.
There are only 10 types of people in the world, those who understand binary and those who don't.

QuestionIncorrect Oracle.DataAccess.ddl reference in web site projectmembervanikanc9 May '13 - 3:29 
Hello All,
 
I created a new web site.
 
I need to get data from oracle. So, I installed the ODAC components.
 
To add a reference in my web site, I accidentially, added the dll reference from this location - C:\app\\product\11.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll
 
I need to get this dll reference from C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.3.0__89b483f429c47342\Oracle.DataAccess.dll
 
I keep adding this new reference but it is not adding this new reference as well. How can I change this?
 
Thank you!!!
AnswerRe: Incorrect Oracle.DataAccess.ddl reference in web site projectmembermark merrens9 May '13 - 6:59 
Delete the first reference?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
 
me, me, me
me, in pictures

GeneralRe: Incorrect Oracle.DataAccess.ddl reference in web site projectmembervanikanc10 May '13 - 2:28 
Thank you for your reply.
 
Since this is set up as a web site, there is not reference folder. I right click on project, and add a reference. When I select the dll from the correct location, windows folder, it adds this reference in the web.config file. There is not path specified in the config file.
 
Thanks!!
GeneralRe: Incorrect Oracle.DataAccess.ddl reference in web site projectmembermark merrens10 May '13 - 4:52 
Never used that bastardized version of a web site. However, just delete the reference from Web.config, then.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
 
me, me, me
me, in pictures

AnswerRe: Incorrect Oracle.DataAccess.ddl reference in web site projectmemberryanb3110 May '13 - 7:15 
Since you want the reference out of the GAC when you go to add Reference it should show up in Assemblies/Extensions. You should not browse to it.
There are only 10 types of people in the world, those who understand binary and those who don't.

QuestionHow to upload a video in sql server 2005 then play it in asp.netmemberMember 100160088 May '13 - 15:42 
Hi my name is Isaac,
How can I upload a video in sql server 2005 then play it in asp.net webpage.
And create a playlist on web page of all video that i upload in sql server so that a user can choose a video to play and see to many time a video was played.
I need your help please step by step
QuestionRe: How to upload a video in sql server 2005 then play it in asp.netmvpSandeep Mewara9 May '13 - 6:50 
What have you tried so far? Where are you stuck?
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

AnswerRe: How to upload a video in sql server 2005 then play it in asp.netmemberMember 100160089 May '13 - 11:10 
I tried to upload a video it accept (only MP4 format) but FLV format refuse.
But when I want to play it on a webpage it accept for some video, but other video just make sound but no video.
AnswerRe: How to upload a video in sql server 2005 then play it in asp.netmemberMember 100160089 May '13 - 11:39 
Excuse me for the delay to respond.
 
my problem is: I tried to upload a video it accept (only the MP4 format) but FLV format refuse.
But when I want to play it on a webpage it accept for some video, but other video just make sound but no video. I used the videohandler.ashx file for the video.
what I need is to upload any kind of video if it posible or if it not possible to convert a video in flv before insert it in sql server then show all the video in kind of a playlist so that a user can choose a video to play like in youtube.
I tried this codes but it have some problem Video Uploader Control for SQL Server
 
Video Uploader Control for SQL Server[^]
SuggestionRe: How to upload a video in sql server 2005 then play it in asp.netmemberryanb3110 May '13 - 7:16 
It takes a lot of code to do what you are asking, too much to be able to answer you easily here. You'll need to be more specific as to where exactly you are stuck.
There are only 10 types of people in the world, those who understand binary and those who don't.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 19 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid