|
hello,
u have to find particular button in RowCommand in asp.net 2.0 or ItemCommand In asp.net 1.1.
with help of commandName Property of button u just find particular button
if(e.item.commandname="selected")
{
}
I hope this info will help u.If not pls wait for .net Guru suggestions
|
|
|
|
|
Hello
I'm a begginer in programming[asp.net(vb)]
Please tell me how do I access CommandField inside of a GridView........
I have a button inside my GridView1.I want it to display More Infomation on the other GridView2,about the member selected
oga m
|
|
|
|
|
Can you please help me with my error
************
This is the Error
************
Error 2 Argument not specified for parameter 'ConPassword' of 'Public Sub addNewAdmin(Email As String, IDNumber As String, Title As String, Surname As String, Name As String, Occupation As String, Cell As String, Telephone As String, Password As String, ConPassword As String)'. C:\FinalTimeSheet\UserAdmin.aspx.vb 9 C:\FinalTimeSheet\
*********
This is my code
***********
Public Sub addNewAdmin(ByVal Email As String, ByVal IDNumber As String, ByVal Title As String, ByVal Surname As String, ByVal Name As String, ByVal Occupation As String, ByVal Cell As String, ByVal Telephone As String, ByVal Password As String, ByVal ConPassword As String)
Dim Sql As String
Dim obj As Datalayer.Database = New Datalayer.Database
Sql = "insert into UserAdministration (E_mail,Id_Number,Title,Surname,Name,Occupation,Mobile_Number,Telephone,Password,Confirm_Password)" & _
" Values('" & Email & "','" & IDNumber & "','" & Title & "','" & Surname & "','" & Name & "', '" & Occupation & "', '" & Cell & "','" & Telephone & "','" & Password & "','" & ConPassword & "')"
obj.Execute(Sql)
End Sub
*************
Code for Button Click
************
Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim ds As New Data.DataSet
Dim Obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Obj.addNewAdmin(txtEmail.Text, txtIdNumber.Text, txtTitle.Text, txtSurname.Text, txtOccupation.Text, txtCell.Text, txtTelephone.Text, txtPassword.Text, txtConPassword.Text)
If txtPassword.Text <> txtConPassword.Text Then
MsgBox("Passwords do not match")
txtPassword.Focus()
Exit Sub
Else
SaveData()
End If
End Sub
*************
oga m
|
|
|
|
|
just a quick glance...is the txtConPassword.Text empty?
<< >>
|
|
|
|
|
Please don't repost.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi, I am a new beginner with ASP.net. I am using visual studio 2005, and I need to get data from database and show it in a textbox, just like google's autocomplete. I found an example
http://www.codeproject.com/useritems/Autocomplete.asp
and I was wondering about 2 clases is this project, sqlHelper.cs and sqlProivder.cs, am I free to use theese classes ? Are they provided by Microsoft ?
If someone could give some good & easy to understand examples of autocomplete with ASP.net & c#, then I would be very much thankful.
( sorry for my bad english, I'm norwegian, so my english is not that good )
|
|
|
|
|
One post is enough.
Regards,
Satips.
|
|
|
|
|
Hi, I am a new beginner with ASP.net. I am using visual studio 2005, and I need to get data from database and show it in a textbox, just like google's autocomplete. I found an example
http://www.codeproject.com/useritems/Autocomplete.asp
and I was wondering about 2 clases is this project, sqlHelper.cs and sqlProivder.cs, am I free to use theese classes ? Are they provided by Microsoft ?
If someone could give some good & easy to understand examples of autocomplete with ASP.net & c#, then I would be very much thankful.
( sorry for my bad english, I'm norwegian, so my english is not that good )
|
|
|
|
|
|
sdklfjlkdsfjdklsfjkdslfjdslkf wrote: and I was wondering about 2 clases is this project, sqlHelper.cs and sqlProivder.cs, am I free to use theese classes ?
you might ask the author...
sdklfjlkdsfjdklsfjkdslfjdslkf wrote: good & easy to understand examples of autocomplete with ASP.net & c#
how about this http://www.codeproject.com/useritems/Autocomplete.asp[^]
|
|
|
|
|
This is the Error
************
Error 2 Argument not specified for parameter 'ConPassword' of 'Public Sub addNewAdmin(Email As String, IDNumber As String, Title As String, Surname As String, Name As String, Occupation As String, Cell As String, Telephone As String, Password As String, ConPassword As String)'. C:\FinalTimeSheet\UserAdmin.aspx.vb 9 C:\FinalTimeSheet\
*********
This is my code
***********
Public Sub addNewAdmin(ByVal Email As String, ByVal IDNumber As String, ByVal Title As String, ByVal Surname As String, ByVal Name As String, ByVal Occupation As String, ByVal Cell As String, ByVal Telephone As String, ByVal Password As String, ByVal ConPassword As String)
Dim Sql As String
Dim obj As Datalayer.Database = New Datalayer.Database
Sql = "insert into UserAdministration (E_mail,Id_Number,Title,Surname,Name,Occupation,Mobile_Number,Telephone,Password,Confirm_Password)" & _
" Values('" & Email & "','" & IDNumber & "','" & Title & "','" & Surname & "','" & Name & "', '" & Occupation & "', '" & Cell & "','" & Telephone & "','" & Password & "','" & ConPassword & "')"
obj.Execute(Sql)
End Sub
*************
Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim ds As New Data.DataSet
Dim Obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Obj.addNewAdmin(txtEmail.Text, txtIdNumber.Text, txtTitle.Text, txtSurname.Text, txtOccupation.Text, txtCell.Text, txtTelephone.Text, txtPassword.Text, txtConPassword.Text)
If txtPassword.Text <> txtConPassword.Text Then
MsgBox("Passwords do not match")
txtPassword.Focus()
Exit Sub
Else
SaveData()
End If
End Sub
*************
oga m
|
|
|
|
|
please help me with this code,I really don't understand what might be the problem
oga m
|
|
|
|
|
Count the parameters in the method signature, then in the code calling the method. When you have spotted that the number of paramteres doesn't match, check the parameters one by one until you spot the one that you have forgotten.
---
single minded; short sighted; long gone;
|
|
|
|
|
how to make download file?
|
|
|
|
|
just expose the url
<< >>
|
|
|
|
|
Hi dears,
I logged in to my webserver control panel and created a subdomain like "downloads".
then I created a directory in my wwwroot as same as subdomain "downloads" and put a default.aspx file in the directory. but when I type http://downloads.mysite.com in browser an error occured with this message:
Runtime Error <br />
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. <br />
<br />
Details: To enable the details of this specific error message to be viewable on remote machines, please create a < customErrors > tag within a "web.config" configuration file located in the root directory of the current web application. This < customErrors > tag should then have its "mode" attribute set to "Off".
Should I do anything more???
thx for your help,
www.behzadi.net
|
|
|
|
|
-first to see the error detail, set its mode to Off
- I just guess: you set webroot for the sub folder which you just created
<< >>
|
|
|
|
|
hi
how can rename a table in sql server 2000 (with tsql in query analyzer)?
|
|
|
|
|
RENAME TABLE old
TO new
hope this helps..
Kunal
|
|
|
|
|
from : http://p2p.wrox.com/topic.asp?TOPIC_ID=24417
Hi,
Yes, you can use sp_rename for renaming a table or column in SQL Server. The only difference is that if you want to rename a column witbin a table you need to provide proper namespace.
for e.g.
for renaming a table
EXEC sp_rename 'Old_TableName', 'New_TableName'
for renaming a column
EXEC sp_rename 'TableName.[Old_ColumnName]', 'TableName.[New_ColumnName]', 'COLUMN'
Hope this helps,
Lalit,
Life Means More...
|
|
|
|
|
Hi,
I have the following treeview, wich works perfect if I only have a depth of childnodes of one. But my problem is that my menu has a childnode depth of two.... Like this
Home
Products
--Dogs
----Food
----Brushes
--Cats
----Food
----Brushes
--Horses
Links
My code only expand (when I click on Products) and shows
Home
Products
--Dogs
--Cats
--Horses
Links
When I try to clik on Dogs - it does'nt expand the nex childnode (Food and Brushes)..... I tried to made a "Run to curser", and I can see, it does not go back to the server, and runs TreeNodePopulate. Can anyone help me? I want to expand also when I click on Dogs and so on.
My code:
aspx:
<asp:treeview id="MenuTree" enableclientscript="true" runat="server" maxdatabinddepth="2" expanddepth="2" showexpandcollapse="False" ontreenodecollapsed="MenuTree_TreeNodeCollapsed" ontreenodeexpanded="MenuTree_TreeNodeExpanded" ontreenodepopulate="MenuTree_TreeNodePopulate" populatenodesfromclient="true">
<hovernodestyle font-underline="True">
<selectednodestyle backcolor="Gray" font-underline="True">
aspx.cs:
public partial class Admin_SideAdm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ANSIApi api = new ANSIApi();
if (IsPostBack == false)
{
try
{
if (api.GetTopMenu(MenuTree) == ANSIApi.FStatus.Success)
{ }
}
catch
{ }
}
}
protected void MenuTree_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
//hvis der ikke er nogen child nodes til noden
if (e.Node.ChildNodes.Count == 0)
{
try
{
api.GetSubMenu(e.Node);
}
catch
{ }
}
}
protected void MenuTree_TreeNodeCollapsed(object sender, TreeNodeEventArgs e)
{
try
{
int key_id = Convert.ToInt32(e.Node.Value);
lblMenuId.Text = key_id.ToString();
lblMenuId.Visible = true;
}
catch
{
}
}
protected void MenuTree_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
{
try
{
int key_id = Convert.ToInt32(e.Node.Value);
lblMenuId.Text = key_id.ToString();
lblMenuId.Visible = true;
if (e.Node.Depth == 0)
{
TreeView t = (TreeView)sender;
for (int i = 0; i < t.Nodes.Count; i++)
{
if (t.Nodes[i] != e.Node)
{
t.Nodes[i].CollapseAll();
}
}
}
}
catch
{
}
}
}
Kind regards,
simsen
|
|
|
|
|
hi
i wanted to implement sessions in my application... i wrote the following code on the login page
if (dread.Read())<br />
{<br />
Session["user"] = uname.Text;<br />
Response.Redirect("MainP.aspx");<br />
}
then on the page load event of the following pages i wrote this code..(used master pages.though)
<br />
if (!IsPostBack)<br />
{<br />
if (Session["user"] != null)<br />
{<br />
Label1.Text = Session["user"].ToString() + "!!";<br />
Response.Cache.SetExpires(DateTime.Now.AddSeconds(0));<br />
Response.Cache.SetCacheability(HttpCacheability.NoCache);<br />
Response.Cache.SetValidUntilExpires(true);<br />
<br />
}<br />
else<br />
{<br />
Response.Redirect("login.aspx");<br />
string uname = (string)(Session["User"]);<br />
}<br />
}
Now the problem is that, if i dont login, no page will open, if i type the URL, but afted logout, on BACK BUTTON press of the web browser, the page opens, instead of getting redirected to login page.
any ideas..
then i created a LOGOUT LInk Button, and wrote the following code...
protected void LinkButton1_Click(object sender, EventArgs e)<br />
{<br />
Session.Abandon();<br />
Session.Clear();<br />
Session["user"] = null;<br />
Response.Redirect("login.aspx");<br />
}
Kunal
|
|
|
|
|
Hi,
Put the following piece of code on every page, outside of postback check
if (Session["user"] == null){
Response.Redirect("login.aspx");
string uname = (string)(Session["User"]);
}
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
not working.. that back button still gets me to the page.. is there a problem with the logout link button code..??
Kunal
|
|
|
|
|
Kunal P wrote: Response.Cache.SetExpires(DateTime.Now.AddSeconds(0));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetValidUntilExpires(true);
Move the above code to the beginning of the Page_Load Event.
|
|
|
|
|