|
<%@ Page Language="C#" %><br />
<html><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
firstname:<asp:TextBox ID="TextBox1" runat="server"/><br />
<br /><br />
lastname:<asp:TextBox ID="TextBox2" runat="server"/><br />
<br /><br />
<asp:Button ID="Button1" runat="server" Text="Submit" /><br />
<br /><br /><br />
<asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" /> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="returnByName" TypeName="myService.Service"><br />
<SelectParameters><br />
<asp:ControlParameter ControlID="TextBox1" Name="firstName" PropertyName="Text" Type="String" /><br />
<asp:ControlParameter ControlID="TextBox2" Name="lastName" PropertyName="Text" Type="String" /><br />
</SelectParameters><br />
</asp:ObjectDataSource><br />
<br /><br />
</div><br />
</form><br />
</body><br />
</html>
I want that when the user clicks the button
the gridview should be filtered by the parameter values in textbox1 & 2.
Shimi
|
|
|
|
|
hi there,
i am creating a project on asp.net. can anyone help me how can i create pop up menus using javascript file.when the mouse is placed on the tabs the pop up menus must pop up.what else can we add in a pop up menu ie a image or hyper link etc.
Thanking you in advance.
Dilip
|
|
|
|
|
hai,
In my page i am having multi select list boxes.I retrieved data from sqlserver to these listboxes..Here my problem is,if i want to see the selected item ,i should scroll down and then only i can see that..Is there any solution to set focus on that selected items without scrolling?...
thanks,
ida
|
|
|
|
|
Hi all,
I am using this code to open a new window on the lostfocus of a text box
<input class="SaveHistory" onkeypress="window.event.returnValue = BacoValidateDate(window.event.keycode)"
id="txtStartdate" onkeydown="SelectStartDate_keydown" onBlur="SelectStartDate_Blur"
title="F2 - Calendar" type="text" maxLength="10" onchange="window.InvalidFlag_StartDate.innerHTML=Empty"
size="10" name="txtStartdate" runat="server"><font size="1"> (<%= strDateStringValue%>)</font>
<script language="VBS">
And
<script language="VBS">
Sub SelectStartDate_clicked
Dim curDate, calurl, d, curDate2
curDate = Baco.txtStartDate.Value
calUrl = "..\..\Calendar.asp"
If Len(curDate) > 0 Then calUrl = calUrl & "?Date=" & curDate
d = window.showModalDialog(calUrl, ,"dialogHeight:320px;dialogwidth:315px")
If Not IsEmpty(d) Then
Baco.txtStartDate.Value = d
InvalidFlag_StartDate.innerHTML = Empty
End If
End Sub
Sub SelectStartDate_keydown
If window.event.keycode=113 Then
SelectStartDate_clicked
window.event.returnValue = False
End If
End Sub
Sub SelectStartDate_Blur
If <%=Request.QueryString("Action")%> = 4 Then
window.location="Mypage.aspx?Res_Id=<%=Request.QueryString("Res_Id")%>&Cycle=" & Baco.txtCycle.value & "&SchCode=<%=Request.QueryString("SchCode")%>&Action=4&StartDate=" & Baco.txtStartDate.Value & "&sCode=" & Baco.txtSchcode.value
'Window.location="solWorkSchedule.aspx"
'window.alert("hai")
End If
End Sub
</script>
But I getting the javascript error msg as "Object Doesnot support this method in the blur event". Can some one help
Dana
|
|
|
|
|
No Problem I have solved it. I have placed some Javascript codings in the Head Part Of the HTML. I removed it to the Bottom of the page(though it should not be done)
Dana
|
|
|
|
|
I have website with 20 pages. One user have the access to all pages and i want to give access for another user for only 10 pages..
What concept i have to use here?
G. Satish
|
|
|
|
|
Could you explain it properly ?
What i understood is that depending on the user type,he would be able to access different pages.
First thing you need to differentiate the users like,
Admin,user..etc
While login Check the Credentials if user is Admin or User
now how to implement this ?...
For that you should have some workflow to your web.
Create a base class that extends UI page and impliment the logic in this base class
now your every page must extends this base class instead of System.Web.UI.Page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
But, i need this at authentication concept. Any authentiction concept is used to give access to the users...
G. Satish
|
|
|
|
|
Hi satish,
ya 2 months before i got same probs,
i have achieved this using some usercontrol,
While authentication time get the userid,
based on his userid u can view the pages in that usercontrol,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
ya sandip is right .....................check the user type .........then u can move further .........................one way sandip told u .......
i have another in ma mind that create a 2 user controls one have the link to all pages and other have link to 10 pages only and add these 2 user control to every page of application and now hide the 1st control if it is user or hide the 2nd user control if it is admin ....................................
Sandip can u please enlarge the concept of UI page how can we achieve that...............................................
Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)
|
|
|
|
|
Sorry Manish,
Actually i amo getting any mail from CP that's why couldn't see your post.
manish.singhal wrote: Sandip can u please enlarge the concept of UI page how can we achieve that
Every page base class is System.Web.UI.Page if you want to do any implimentation in every page Like (LOGIN credentials,Security...etc)
you can have a base class like BaseClass which inherites from System.Web.UI.Page and Override Page Load method also you can have impliment interface in thise base class that will have all work flow methods. Now your Page will inherite from this base class instead System.Web.UI.Page and override/call the base class method from your page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
sorry sandip but i dint got can please elaborate that..........................................................
Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)
|
|
|
|
|
Hi All,
I want to allow user to select & arrange columns that he would like to view on the report page. Something similar to Outlook. Which data control in asp.net would allow me to do this?
Regards,
Tanmay.
|
|
|
|
|
Hi all,
can anyone help me...
i have a aspx page and iam retriving some data to that page from the sql server.
that data is like index...
and i have anchor tags for a,b,c,....z.
when ever i click on 'a ' it should go to the items which starts with letter a..
if i click on 's' it should go to the items which starts with letter s...
thanks in advance..
siri
|
|
|
|
|
Your question has nothing to do with ASP.NET. You should have posted it in the Web Development forum.
Anyway, you could add a querystring variable to the url for each hyperlink which represents the selected letter. In your server-side code, you can pick up the value of the querystring variable by referencing the Request.QueryString .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I created a Class by name Studentinfo with required properties
public partial class _Default : System.Web.UI.Page<br />
{<br />
ArrayList al = new ArrayList();<br />
<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
al.Add(new StudentInfo(1, "aaa", "MCA", "bbb", "ccc", 2));<br />
al.Add(new StudentInfo(2, "bbb", "MBA", "ccc", "aaa", 2));<br />
al.Add(new StudentInfo(3, "yyy", "LKG", "aaa", "aaa", 0));<br />
<br />
GridView1.DataSource = al;<br />
GridView1.DataBind();<br />
<br />
}<br />
<br />
<br />
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)<br />
{<br />
<br />
}<br />
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
DetailsView1.DataSource = al;<br />
DetailsView1.PageIndex = GridView1.SelectedIndex;<br />
DetailsView1.DataBind();<br />
<br />
}<br />
<br />
protected void DetailsView1_ModeChanged(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e)<br />
{<br />
if (e.CancelingEdit)<br />
{<br />
DetailsView1.ChangeMode(DetailsViewMode.ReadOnly);<br />
}<br />
else if (e.NewMode == DetailsViewMode.Edit)<br />
{<br />
DetailsView1.ChangeMode(DetailsViewMode.Edit);<br />
}<br />
DetailsView1.DataSource = al;<br />
DetailsView1.DataBind();<br />
<br />
}<br />
protected void DetailsView1_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)<br />
{<br />
<br />
}<br />
protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)<br />
{<br />
if (e.AffectedRows == 0)<br />
{<br />
e.KeepInEditMode = true;<br />
}<br />
<br />
<br />
<br />
GridView1.DataBind();<br />
}<br />
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)<br />
{<br />
<br />
GridView1.UpdateRow(DetailsView1.PageIndex,false);<br />
GridView1.DataBind();<br />
<br />
}<br />
}
then i created a GridView1 and binded with arraylist
whenever i click on select button DetailsView should come with required values thus when we update in DetailsView by clicking edit and update.
The Updated values should reflect in GridView also.
Please help me in this ...
usharani
|
|
|
|
|
Hi, I am developing website in dotnet2.0 and my site contains webpages which accepts payments from users using credit or debit cards. I want to integrate paypal to my website. How can i do this?
I saw the paypal website..but not that much understandble. i need it in simple way..
I want to know the process of integration to start this. If we integrate paypal to my site, what they will provide to us, what should we provide to them. How integration takes place.
can any one help on this.
Thank You
G. Satish
G. Satish
|
|
|
|
|
Satish - Developer wrote: Hi, I am developing website in dotnet2.0 and my site contains webpages which accepts payments from users using credit or debit cards. I want to integrate paypal to my website. How can i do this?
I saw the paypal website..but not that much understandble. i need it in simple way..
I want to know the process of integration to start this. If we integrate paypal to my site, what they will provide to us, what should we provide to them. How integration takes place.
can any one help on this.
Although I no longer use it, Paypal have an excellent developer community and support on their website. they provide sandboxes to test out transactions, sample layouts - basically everything you need to incorporate paypal. It wasn't hard and I had a basic proof of concept working within a few hours, with the same look and feel as the rest of my site. Browse their help forums - you will have more chance than you do here.
The proof of concept was rejected and we went for Barclays payment system - expensive, but oh so slick....
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|
|
hi;
i have adrotator control in my webpage,
i want to update the images in regular intervels without using timer control.
i want pictures to be changed in regular intervels without refreshing the page.
how to do this?
i dont want to use update panel and timer control too.
is it possible to change the pictures in regular intervels without refreshing the page.
The most difficult phase of life is not when no one understands you ; It is when you don’t understand yourself.
|
|
|
|
|
Raam wrote: is it possible to change the pictures in regular intervels without refreshing the page.
You have to refresh 'some' of your page - but you don't have to refresh the whole page. Iwould have said UpdatePanel as this is exactly what it is for. But for some reason you don't want to use one. So...your only other option (unless you want to go down teh ifRame route) is to roll your own Ajax call, fire off a request to the server ,retrieve your HTML snippet, set the innerHTML of a div with this snippet. Which is what an UpdatePanel does!
Raam wrote: i want pictures to be changed in regular intervels without refreshing the page.
regular intervals need to be timed. you need a timer to do something regularly. If you don't want to use the ASP.NET timer, just use the JS setTimeout method.
Raam wrote: i dont want to use update panel and timer control too.
Why not? You've just discounted the two components that will give you the easiest solution.
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|
|
Thanks for ur reply Malcolm
Let me work out on the ways u told n came to u.
Thanks a lot
The most difficult phase of life is not when no one understands you ; It is when you don’t understand yourself.
|
|
|
|
|
function ChangePage(id)
{
// save the page clicked
document.all.PageNumber.value = id;
// call the __doPostBack function to post back the form and execute the PageClick event
__doPostBack('PageClick','');
}
It's working fine when I use this code with aspx page(without master page)
but when I use this code with aspx page(with master page).
It's not working.
can anyone tell me how to do it.
means how to assign id into document.all.PageNumber.value using master page ?
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Hi,
you can check this link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi there,
i saw saw your query and i got solution for that one. go through the following url,hoping this will help to solve your problem.
http://www.dotnetspider.com/qa/Question4027.aspx
Thank you
Dilip
|
|
|
|
|
Hi,
in asp.net 2.0 i am redirecting from one page to another page. i am passing some values to another page using querystring.i don't want to display the query string in address bar.how can i do that?can anybody helps me?
With regards,
anu
|
|
|
|