|
When i am adding an item to gridview i want set the screen view at that row. So i am add 100 th Item and if it goes outside the page then my page automatically gets a scrollbar and focus is on that item....How to do that?
Thanks for any help................
|
|
|
|
|
You can use the jQuery.ScrollTo method or
the window.scrollTo method.
|
|
|
|
|
Also consider this code ....
<html>
<body>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<a href=# name="there"></a>
hello ?
</body>
Now if the url of the page is "scrll.htm"
and you call the page like this ...
scrll.htm#there
the page will scroll to the "named anchor"
|
|
|
|
|
Hi,
My application is created using ASP.Net Web Application template.
I want script Manager to be added in one of my page.
I did the following to make My existing ASP.Net web application to Ajax enabled. But it is not working.
Installed ASPAJAXExtSetup.msi
added below config in web.config
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
When i am tring to add a <asp:ScriptManager runat="server" />
Under form tag , I am not getting this tag in intellisence.
Please help how I can add scriptManager to my existing ASp.net web application.
Thanks,
Salmon.
|
|
|
|
|
Looks like you forgot:
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
I would suggest you to create a new project that is AJAX Enabled(using AJAX Enabled template), and then just copy the Web.Config file from there in your project. After that you can add/update any other stuff like Appsetting section/Authentication/Authorization sections as it was earlier in your project.
|
|
|
|
|
|
I am Redirecting mypage to another page and passing username & password from Query string. I want hide them.
Actually i dont want to use Session, Cookies, Context, Server.Transfer and any other state management technique. I just want to use Querystring and want to hide it and also dont want to encrypt and decrypt Querystring.
Thanks for any help.....
|
|
|
|
|
Not asking much then, if you don't want to use the various things provided.
Think you should maybe rethink on why you don't want to use those topics, and what exactly you are wanting to achieve.
You can also try here for more info on various methods; http://tinyurl.com/383rkbo[^]
|
|
|
|
|
First of all passing password on your URL is bad, what ever way you do it.
If you wish to not use session/cookies/server.transfer then you are left with only querystring or the request.form objects.
As far as I know you cannot hide data from querystring, you can encrypt/decrypt it though, but you don't want to do it.
So, you have to go the classic ASP way and POST the data to the new page and get the data using request.form.
HTH!
|
|
|
|
|
sandympatil wrote: Actually i dont want to use Session, Cookies, Context, Server.Transfer and any other state management technique. I just want to use Querystring
You dont want ot use any other any other state management technique and just want ot use querystring.
AFAIK,There is no way to hide querystring parameter else you have to use another way.Better you can encrypt/decrypt if you have to stick with querystring.
Generally it is not recommendsed to use querystring for sensitive data like yours.
|
|
|
|
|
sandympatil wrote: just want to use Querystring and want to hide it
OOkay , here is what the "login"
page looks like...
</head>
<body>
<form action=''>
enter password<br>
<input type="password" name="password" >
<input type="submit" >
</form>
</body>
<script type="text/javascript">
xhr = new XMLHttpRequest();
myredirect = function () {
xhr.open("GET", "http://whoever.com/Default3.aspx?" + document.forms[0].password.value, true);
xhr.onreadystatechange = function () {
if (this.readyState == 4) {
if (this.responseText == "failed") { alert("failed"); }
else {
window.location.replace(this.responseText);
}
}
}
xhr.send(null);
return false;
}
document.forms[0].onsubmit = myredirect;
</script>
</html>
hereis the aspx file ...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
here is the aspx.cs ...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString.ToString() == "password")
{
Response.Write("http://www.msn.com");
Response.End();
}
else
{
Response.Write("failed");
Response.End();
}
}
}
|
|
|
|
|
Thanks for Reply..........
|
|
|
|
|
As always, you are more than welcome.
Thank you for the "vote up".
|
|
|
|
|
|
Once I had the same problem, but it was a special case, I used to send the user name and password from server to client PC and then from client PC using JavaScript to another server using post method, I know it is not a secure solution, but temporary you can use this technique.
Thanks
Khalid, Afghanistan
|
|
|
|
|
Hi.
I have this UpdatePanel with som boundfield content. In this panel (on every row), there is an edit link, which will edit the content. It works fine.
Now I want to make all the boundfields clickable as a link, so they act as the edit button for each row content. In that way, I dont have to click the edit button, but can click anywhere in the corresponding row to edit the content. (if only it is possible to make the content-text clickable, I guess thats ok too).
My code:
<asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvTasks" runat="server" OnRowCreated="gvTasks_RowCreated"
DataSourceID="odsTaskList" GridLines="None" AutoGenerateColumns="false"
CssClass="mGrid" PagerStyle-CssClass="pgr"AlternatingRowStyle-CssClass="alt"
OnSelectedIndexChanged="GvTasks_SelectedIndexChanged" DataKeyNames="ID">
<Columns>
<asp:BoundField DataField="Content" HeaderText="Content">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="Enddate" HeaderText="Enddate">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btnViewDetails" runat="server" Text="Edit" CommandName="Select" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="removeButton" runat="server" CommandArgument='<%# Eval( "id" ) >' OnCommand="removeButton_Click" ImageUrl="~/img/remove.gif" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate&>
</asp:UpdatePanel>
Hope you can help!
Thanks alot
// Sorry for the formatting, seems like code-project has a problem at the moment?!
|
|
|
|
|
hi,
Use the code below,
<asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvTasks" runat="server" OnRowCreated="gvTasks_RowCreated" DataSourceID="odsTaskList"
GridLines="None" AutoGenerateColumns="false" CssClass="mGrid" PagerStyle-CssClass="pgr"
AlternatingRowStyle-CssClass="alt" OnSelectedIndexChanged="GvTasks_SelectedIndexChanged"
DataKeyNames="ID">
<Columns>
<asp:TemplateField HeaderText="Content">
<ItemTemplate>
<asp:LinkButton ID="btnContent" runat="server" CommandName="Select" ><%# Eval("Content")%></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Enddate">
<ItemTemplate>
<asp:LinkButton ID="btnEnddate" runat="server" CommandName="Select" ><%# Eval("Enddate")%></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="removeButton" runat="server" CommandArgument='<%# Eval( "id" ) %>'
OnCommand="removeButton_Click" ImageUrl="~/img/remove.gif" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Hope this will help.
|
|
|
|
|
Of course!
Thanks alot man!
|
|
|
|
|
Hi guys, does anyone know how you can insert data from an excel file into
tables in sql sever(2005)
I tried the below and gives me an error:
SELECT *
INTO [member_details]
FROM OPENROWSET('MSDASQL',
'Driver={Microsoft Excel Driver (*.xlsx)};DBQ=c:\memebers.xlsx',
'SELECT * FROM [Wanderes$]')
and the error: The OLE DB provider "MSDASQL" for linked server "(null)" reported an error. The provider did not give any information about the error.
Am doing all this in Sql Server
Please help
Thanks, Morg
|
|
|
|
|
|
Respected Sir,
On IE My web site run with alignment.But on Chrome it not run
with good manner and alignment will be change.
please help me
Thanks And regards
lalit
|
|
|
|
|
how are you doing the alignment? what language? javascript, CSS or from the style tags in the control.
If you could show a sample of the code where its going wrong and how we might be able to help you furhter
|
|
|
|
|
Hai all
I need to open save dialog box on ultrawebgrid cell click , i hv used the code "document.execCommand("saveAs")"
dialog box is opening , but i need to save .doc file also, in the filetype it shows only Html and .txt file. Plz help me .
Thank you
|
|
|
|
|
|
hai all,
i have a sqlstatemnt which returns 10 rows.
I am fillig this data in gridview using datareader.Nothing new.
But i wanted to fill the data on some condition,so that the rows which are fulfilling that condition can only come in the gridview.
out of 10 rows i need 2,5,7,9,10 rows data.Infact i want to skip the data on some condition.
I s possible with datareader?
if yes how to do?If not how to do?
Please anybody have any idea is helpful for me.
Thanks in advance.
kissy
|
|
|
|