|
hai .netman,
not changing the value in database.
when i change the text in dropdownlist, its not fetching the value of the particular "selecteditem"
for example if the drop down list consist of "A,B,C,D,E" as {dropdowntext} and the values are A=1;B=1;C=4;D=1;E=2; so,.......
when i select the "A" no problem.
sequencly i select "B", no problem.
again i select "D", its not selecting.instead "A" remains there.
|
|
|
|
|
Here some fields have same values like First,front & rear have value 1. Hence if you select any text which has same value it points to first text which has value 1.
solution : if possible change you sql quesry as
select TEXT,concat(VALUE,TEXT)as VALUE from tbl_test where criteria=hello"
now you will get the required text selected. If you need a value of selected,you need to pick only VALUE part from (VALUE,TEXT) combination
modified on Monday, April 28, 2008 7:13 AM
|
|
|
|
|
hai trish.......
there is no function CONCAT in MS SQL server
|
|
|
|
|
Yes there is no CONCAT fucntion in Sql Server .it's in ORACLE
For Sql Server you can do the same thing with + sign
e.g Select First_Col + Second_col from table
|
|
|
|
|
I created profile-node in "web.config",
but in code, Profile can not be identified?
|
|
|
|
|
in my project, in login form ,i want to use role as admin and user. i made one table in sqlserver2000 and specify the role
then according to role how i login. plese specify the code
Signature preview salil_k_singh 11:06 15 Jul '07
|
|
|
|
|
I am not sure if there's any role based stuff build in, but you can store what someones role is. in the session, or call the data layer to tell you this based on the login. The idea is, your login user has one or more roles, then the roles define what can be done. You use roles so you can specify what a group of people can do, not just one person.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You can set the roles as admin and user by using 1 and 0. Apply the admin user the number 0 and normal user 1. Then you can just check which number is logging on to determine what facilities to let that person use.
|
|
|
|
|
i m developing a project in asp.net with c# (.net 2005, 2.0 framework)
when i create a dropdownlist and fill the value and process the function
"combobox1_SelectedIndexChanged(object sender, System.EventArgs e)"
is calling twice automatically. whatever the content i placed inside this function, its calling twice.....
y?
help me - KARAN
|
|
|
|
|
Hard to say, it gets called once for me. Must be something to do with your code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Have you called this function/event from anywhere else?which may trigger at the same time when combo SelectedIndexChanged event fired.
|
|
|
|
|
I have a gv in my page. It has two bounded columns and edit column. I tried to update a single column but it went to edit mode but it didnt update the data. not even it goes into the roaw_updating event. what should i do now. can someone help me.
I want a gridview to edit a single column in edit mode.
G Nathan
|
|
|
|
|
You have to define a template to edit only the one row, Idon't think you can easily change which row is edited. However, it's hard to say more, because
a/ there's tons of tutorials on this on the web, all of them work, your code must be broken
b/ you didn't post any code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi christian,
Yah i got the solution. I made a mistake on validators thats what it doesnt call update event... thanks for ur support
G Nathan
|
|
|
|
|
Thanks I have solved the Problem.
Hello all,
In my application i have defined a array and dynamically i have created checkbox. Now i am finding the how meny checkbox user have checked by finding the length of array by using following code.
[code]
Dim qidArr() As String
Dim chkQues As CheckBox
Dim i As Integer
Dim sqid, lastid As String
For i = 0 To tableQuestion.Rows.Count - 1
chkQues = CType(tableQuestion.FindControl("chk" & i), CheckBox)
If chkQues.Checked = True Then
lid = CType(tableQuestion.FindControl("lblQid" & i), Label)
If ViewState("qid") <> Nothing Then
lastid = ViewState("qid")
sqid = lastid & "," & lid.Text
qidArr = sqid.Split(",")
Else
sqid = lid.Text
qidArr = sqid.Split(",")
End If
ViewState("qid") = sqid
ViewState("total") = qidArr
End If
Next
If qidArr.Length = 0 Then
Return 0
'ElseIf qidArr.Length = 0 Then
ElseIf qidArr.Length > 3 Then
Return 1
ElseIf qidArr.Length > 0 And qidArr.Length < 4 Then
Return 2
End If
[/code]
but the problem is that if user dosenot check any checkbox the it goes into exception [code]qidArr.Length = 0 [/code] after this statement.
Can anybody tell me how can i check length of array=0.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Monday, April 28, 2008 1:57 AM
|
|
|
|
|
I suspect in this case, it's value is null.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i define a usercontrol and create it and put it in c:\ . then i use this code but i dont know the format of the path can any body help me?
protected Control userControl;
string userControlPath = @"c:/LitwareUserControl.ascx";
this.userControl = this.Page.LoadControl(userControlPath);
this.Controls.Add(this.userControl);
it gives this error: 'c:/LitwareUserControl.ascx' is not a valid virtual path.
|
|
|
|
|
You can use that User Control in the ASP.Net page itself.
like,
<%@ Register TagPrefix="UC1" TagName="IncludesAdminTop" Src="IncludesAdminTop.ascx" %>
Place this after the Page Directive.
Then
<UC1:IncludesAdminTop id="AdminTop" runat="server"></UC1:IncludesAdminTop>
Place this After or Before Body Tag
|
|
|
|
|
I dont want to use it in asp.net page. i use it in webpart so i can not use this way
|
|
|
|
|
Hi
In my project(C#.net) im getting the datetime from user and store it in the database. The given DateTime is the local Datetime.Our server is in USA.
I need to Convert the Given DateTime to Server Datetime before store it into the DB.
Moghan
|
|
|
|
|
To do that, you need to find out the end users time zone. A geolocation database, or asking hte user to tell you, seem the most likely solutions.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ive been searching for any implementations of logincontrol with CAPTCHA
Ive founf a few, but none of them is what i have in mind
The "Best" i found (4guysfromrolla) always requires the user to input the captcha code
What i want is to only requiere captcha after 3 failed attemps (In a n mins period)
Using asp membership to lockout a user is not an option
Im have the following options and problems:
Option: I could count the failed attemps in the session, viewstate, etc
Problem: If the user closes the page, the count will be restarted
Problem: If it is an automated user, it can create a new session on each request
Option: Use IP to track retries
Problem: If it is an automated user, it can use proxies, and so can a normal user
Problem: Not all people has public IP, and if i use this approach, i would be requiring all users behind the blocked IP to imput the captcha control
Has anyone implemented something similar?
Please lt me know of any other ideas you might have
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
iam having ddl control in update panel ..now i want ot execute javascript in ddl selection index changed .how could be solved...
|
|
|
|
|
Page.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Test_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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem>A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>c</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Page.aspx.vb
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
ScriptManager.RegisterStartupScript(Me, Page.GetType, "X", "alert('" & Me.DropDownList1.SelectedValue & "')", True)
End Sub
Alexei Rodriguez
|
|
|
|
|
thank u mr.AlexeiXX3 when iam taking ur example it is working fine..but the same i did in my project
but it is not firing the javascript ...any problem ..?
|
|
|
|