|
amina89 wrote: I need to put the columns of the gridview in editable mode except the first one for insert the data typed into the database.
Are you trying to ask that you want first row normal and rest of them in editable mode? If so, probably you need to use the RowDataBound event where trap the first row and show it as is and rest of the rows in a Edit mode.
|
|
|
|
|
Hi,
I want to use a gridview to insert student grades for a module (total area unknown) for this i use a dynamic query and I display the gridview
Number students ___subject 1____subject2 ....( subjects of a module) but I can not put the gridview in edit mode ,how do that?
I searched on google but most of the gridview it already knows the number of column so we do not use autogenratecolumn=true which facilitates edit mode and insert the gridview data in the database.
Thanks.
|
|
|
|
|
I am quite new to Javascript and this question probably would seem very basic, but I am really stuck. I have a button. When I click it, the Javascript should cause an alert to display "hello" to the screen. When I build the project I get the error:
'ASP.default_aspx' does not contain a definition for 'Hello' and no extension method 'Hello' accepting a first argument of
type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)
Aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_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>Test</title>
<script type="text/javascript">
function Hello() {
alert("hello");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" onClick="Hello()"/>
</div>
</form>
</body>
</html>
|
|
|
|
|
Change it to OnClientClick="Hello()"
OnClick set like you have it will attempt to call a server side function, i.e. your code behind. Which ain't there! Hence the error makes sense.
|
|
|
|
|
here;
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!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 id="form1" runat="server">
<div>
<input id="Submit1" type="submit" value="submit" onclick="return Hello();" />
</div>
</form>
</body>
<script type="text/javascript" language="javascript">
function Hello()
{ alert("Hello"); }
</script>
</html>
|
|
|
|
|
It's just the difference between using a standard html button or an asp.net server button. A button with runat="server" behaves very differently than a normal html button.
|
|
|
|
|
You see this form is supposed to run on server side. So it'll try to call procedures on the server and not the client. If you want to perform this task, you have some options like:
write a function in C# on server side like this
public void Hello()
{MessageBox.Show("Hello World")}
or do not use an asp button. Use HTML button like
<input type="button" onclick="Hello()" />
or as said by somebody above, you can use onClientClick event handler..
Hope this will clarify all your doubts
Don't forget to rate the comments
|
|
|
|
|
Hi
I'm just curious about something. I've recently been playing around with WebRequests and WebResponses. I create a request like so:
WebRequest someRequest = WebRequest.Create("https://blah.blahblah.com/blah/");
Then I retrieve the response stream of that request like so:
Stream objStream = someRequest.GetResponse().GetResponseStream();<br />
StreamReader objReader = new StreamReader(objStream);
This basically returns something like the following:
<div id="main"><div class=header>
<a href='https://www.google.com/accounts/'> <img class=logo
src='https://www.google.com/intl/en/images/logos/accounts_logo.gif'
alt="Google" /> </img> </a></div>
<div id=maincontent>
<table border="0" width="100%" cellpadding=0 cellspacing=0> <tr>
<td width="75%" valign="top"> <div style="font-size:83%;">
<b> A third party service is requesting permission to access your
Google Account.</b><br/><br/>
In order to authorize a third party service to access your account,
you must sign in.</div> </td>
<td style="padding-left: 10px; " valign="top" align="center">
<div id="rhs"> <div id="rhs_login_signup_box">
<script><!--function gaia_onLoginSubmit() {
if (window.gaiacb_onLoginSubmit) { return gaiacb_onLoginSubmit(); } else {
return true; }}--></script><style type="text/css"><!--
div.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif; }
font.errormsg
It basically contains all the website controls etc. My question is, lets say this specific website has a username and password field, is there any way I can edit the above response to navigate my web browser control to the website, populate the username and password boxes and log the user in?
|
|
|
|
|
Your going to have to post back to the server with the values. Check out this article.
Post With C#[^]
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
hi,
am using menu.js to build a menu in an aspx page and am also using prototype.js in the same page and i well know that the use of prototype.js before that menu leads to display the menu in a wrong way in Opera browser where as it work well with IE & Firefox browsers. i need to resolve this with Opera browser inorder to display the menu in a right way as it is shown in other browsers.
Ref Url: http://www.itifsl.cmlinks.co.in/Insurance/Index.aspx.
Kindly help me in getting this problem solved. Thanks in advance.
Regards,
Jayakrishna
|
|
|
|
|
Looks like you need to handle the CSS of the menu based on the browser. Keep the current display stylesheets for IE & Firefox but have a different one for Opera. You can go for two css classes and refer them based on the browser.
|
|
|
|
|
I have a website with calendar like control to book resources. My requirement is to import calendar events from Outlook & Yahoo into my ASP.Net website calendar control. I need some idea about how to achieve this.
For Outlook import/export i know i can use use javascript by creating outlook object.
var objOutlook = new ActiveXObject( "Outlook.Application" )
For Yahoo calendar how to achieve this?
|
|
|
|
|
|
Dear All,
Please help me again,
Is there any way to keep selected node of treeview that existing in Master page.
My logic is when I selected Node3 of childNode2. It will show the result page, but the Node3 of Childnode2 is unselect.
I want to keep selection of it wherever Page I have reach.
Thank and Best Regards
|
|
|
|
|
Store the identity of the selected node in a session variable, perhaps?
|
|
|
|
|
naunt wrote: I want to keep selection of it wherever Page I have reach
You need any of the state management techiniques that suits your application, Session/Basepage property being the best ones. Other's can be QueryString, HiddenField in basepage, Cookie, BasePage Property.
|
|
|
|
|
Dear all,
Please help me solve this.
I got error when browse my asp.net web application from IIS. When publish the project no error show.
The error is as below when browse from IIS.
<br />
XML Parsing Error: not well-formed<br />
Location: http:
Line Number 1, Column 2:<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="BLEntry.aspx.vb" Inherits="WebApplication1.BLEntry1" %><br />
-^
My source code is as below
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
BL List
</h2>
<table style="width: 100%; height:100%">
<tr>
<td style="width:100%; height:90%">
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateDeleteColumn="True"
AutoGenerateEditColumn="True" GridLines="None" Skin="Office2007"
AllowCustomPaging="True" PageSize="20">
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="New BL" />
</td>
</tr>
</table>
</asp:Content>
Thanks and Best Regards
|
|
|
|
|
|
Thank for your reply.
Do you mean to run that exe?
|
|
|
|
|
Open Visual Studio Command Prompt and run that tool with the required arguments. Can you check that link that I've provided in the previous post
|
|
|
|
|
@Arun Jacob : Thank you for your suggestion ...
Can fixed that problem now.
By runing "aspnet_regiis - i" form right version.
First time I did a wrong choice for version, I choose "aspnet_regiis.exe" from v2.0.50727 and run.
Actually I am using version 4.0.
After re-running "aspnet_regiis -i" from v4.0.30319 everythings going smoothly.
Pls, don't mind me for long explain unnecessary, I just mean to people who face this problem in future. Just inform them to do right choice.
Thanks and Best Regards
|
|
|
|
|
I am do my project in "ASP.Net Web Application" in VS2010.
When I publish it have option for publish method (Web Deploy, FTP, File System,FPSE) .
Which publish method I have to choice to browse from IIS virtual directory?
|
|
|
|
|
hi,
how can be known that the pics in the iis server is accessed from other sites?The image from another site get rendered from oursite.Do i have to give the image path from the page ?
regards
anonymous
|
|
|
|
|
This article should point you in the right direction.
generating-asp-net-images-fly
Ignore the parts about generating the image but if you look at Response.ContentType and the way to link to the image this should let you create an aspx page in which you can save request details to a database and then send your image to the client browser.
|
|
|
|
|
Hi,
How to read sheet and columns in Excel and Save to DB.
Sheet are table names
Columns are Field names in table.
Please share the links
Guhananth.S
|
|
|
|