|
you can also add the javascript with the radio buttons in the datagrid.
when any radiobutton checked just check all the rows / items of the datagrid in a loop and deselect other radiobuttons.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
hello,
Actually the problem is that I've to accept text in a control as well as have to display image in the same control .
I tried using Panel but it is not accpting text at run time .
And the Format of the contents of the control is like below:
(At the place of white space there should be image we can use Image control there.)
jhgfdjhkh
uhhiohhui
uifghihhg
ygughrihihjghhhjh
ughuhhhhhiihhhthh
h89uhhuhuyhuihuih
uyg8tryhthythutr7
guhrtuyh8rty8iuiu
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
pls clerify your problems
Softy Boy
|
|
|
|
|
i want to ask that to have
a format like below
ffjjgfghjljkk
Here the user
will enter th
text and the blank space
there will be image soin
order to satsfy6 this re
quirement what shd i do
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
u can use multiline textbox.
for image u can use the html tag and replace at run time where u would like to show.
Softy Boy
|
|
|
|
|
Dears
I need to write the following ORACLE SQL statement in C# in page of ASP as string
Select emp_name as “employees Name” , emp_Add as “address” , dept as “department”
From test.emp_tab ;
Im using as to rename the column name in datagrid
Any one help me to write it by C# as string
Notes we in oracle to rename column name we have to use “ ” same as in defining string in C#
Thanks
|
|
|
|
|
try this
string SqlQry;
SqlQry = "Select emp_name as ""employees Name"" , emp_Add as ""address"" , dept as ""department""
From test.emp_tab";
Regards,
Akhilesh Yadav
|
|
|
|
|
Dear Akhilesh Yadav
its not working by after a lot of time the correct syntax is
SqlQry = "Select emp_name as \"employees Name\" , emp_Add as \"address\" , dept as \"department\"
From test.emp_tab";
so we use \ to cancel meaning of “ in string
thanks
|
|
|
|
|
Hi,
I have a DropDownList which is databound and also has one ListItem. The DropDownList is populated with all ProjectNames from the Project Table.
The ListItem's Text is "All" and the Value is "".
This DropDownList is supposed to be for a search funtionality. When I click on a project, a datagrid will display the records involving the selected project. When I select "All", I would like the datagrid to display the records involving ALL the projects.
I would just like to know if keeping the ListItem's value entry blank will be perfectly fine. If not, then what should it be?
Thanks.
|
|
|
|
|
let me get it right
what u do is that u select a list item and u put its value in the query string and then do the select, assign the datasource, then bind
why do u want to keep the listitem's value blank?
Best Regards
3ala2
|
|
|
|
|
Thanks for the reply 3alaa2,
The thing is, I'm trying to make sense of how the list item will work. Let's say I names the value of the list item All just like the text for the list item.
Currently the query to populate the dropdown is simply:
"SELECT tblProject.inProjectID, tblProject.vchProjectName
FROM tblProject ORDER BY tblProject.vchProjectName"
If I am to include the list item, All, how would the query look?
|
|
|
|
|
No problem
U can simply use the If/Else condition and use the sql statememnt
"SELECT tblProject.inProjectID, tblProject.vchProjectName FROM tblProject ORDER BY tblProject.vchProjectName" if the user select listitem(0) and use your other sql statement that has the Where clause
If u r using stored procedures there is another better solution.
Tell me if u do...
Best Regards
3ala2
|
|
|
|
|
I am using stored procedures for saving/delete/updating records. This Query is a one off query populating a dropdownlist..
Would the solution look something like :
If Me.ddlProject.SelectedValue = ListItem(0) Then
"SELECT tblProject.inProjectID, tblProject.vchProjectName
FROM tblProject
WHERE tblProject.vchProjectName = [Any value(lol no idea what to write here!)]
ORDER BY tblProject.vchProjectName "
Else
"SELECT tblProject.inProjectID, tblProject.vchProjectName
FROM tblProject
ORDER BY tblProject.vchProjectName"
Thanks again for the replyin..
|
|
|
|
|
it's more like ...
<br />
If ddlProject.Items(0).Selected Then<br />
'The (All) statement<br />
<br />
"SELECT tblProject.inProjectID, tblProject.vchProjectName FROM tblProject ORDER BY tblProject.vchProjectName"<br />
<br />
Else<br />
'The specific project statement<br />
"SELECT tblProject.inProjectID, tblProject.vchProjectName FROM tblProject WHERE tblProject.vchProjectName = '"& ddlProjects.selectedValue &"' ORDER BY tblProject.vchProjectName"<br />
<br />
End If<br />
Hope this solves the problem
Best Regards
3ala2
|
|
|
|
|
Thanks man,
One issue though... It is throwing an 'Out of range' error exception..
This is how I am populating the dropdownlist:
<br />
Dim sQueryDDL As String<br />
Dim sTableDDL As String<br />
Dim dsDDL As DataSet = New DataSet<br />
<br />
If ddlProject.Items(0).Selected Then<br />
sTableDDL = "SELECT tblProject.inProjectID, tblProject.vchProjectName FROM tblProject ORDER BY tblProject.vchProjectName"<br />
Else<br />
sTableDDL = "SELECT tblProject.inProjectID, tblProject.vchProjectName FROM tblProject WHERE tblProject.vchProjectName = '" & ddlProject.SelectedValue & "' ORDER BY tblProject.vchProjectName"<br />
End If<br />
sTableDDL = "tblProject"<br />
dsDDL = clsCommon.getData(sQueryDDL, sTableDDL)<br />
dsDDL.Tables(0).DefaultView.Sort = "vchProjectName"<br />
Me.ddlProject.DataSource = dsDDL.Tables(0).DefaultView<br />
Me.ddlProject.DataTextField = "vchProjectName"<br />
Me.ddlProject.DataValueField = "inProjectID"<br />
Me.ddlProject.DataBind()<br />
Me.ddlProject.Items.Insert(0, New ListItem("<< All >>", ""))
I have a creeping suspricion that the last line is the problem. Let me know if you can. Thanks..
|
|
|
|
|
u don't need the last line of code because the drop down list is already binded and the fields are inserted after the Me.ddlProject.DataBind() statement
let me know if u r still havin a problem ...
Best Regards
3ala2
|
|
|
|
|
hi again,
This statement is thrown at me:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
This is the line it highlighted as the erroneous one:
If ddlProjectRequestSearch.Items(0).Selected Then
Question: Shall I implement a <asp:listitem> tag in the front end code for the "All" option? I'm gonna try that now and see what happens.
|
|
|
|
|
u can do that as a solution
If u wanna keep it as before:
<br />
If ddlProjectRequestSearch.SelectedValue = "All" Then<br />
'The code for all ...<br />
Else<br />
'The code for the rest ...<br />
End If<br />
<br />
<br />
End If<br />
Put this code in the ddlProjectRequestSearch_SelectedIndexChanged and make the postback property "True"
or put it in a button and leave the postback property for the ddlProjectRequestSearch in the default state (False)
This should work fine, i tried it now
Best Regards
3ala2
|
|
|
|
|
I am populating the DropDownList in the PageLoad event. When will the list populate if the code is in the ddlProjectRequestSearch_SelectedIndexChanged method ?
Also, exactly where are we defining the ListItem "All". Since I erased it from the .aspx.vb file shall I make a <listitem> tag for it ?
Sorry bout taking up your time and Thanks.
|
|
|
|
|
The code i wrote doesn't populate the drop down list
this is for the event of selecting an item from the list
and yes, try adding a static item (tag) for it Name "All" and Value "All" so that code would work fine with u.
if it doesn't work try adding it in the code behind
<br />
ddlProjectRequestSearch.Items.Add("All")<br />
No problem man
Best Regards
3ala2
|
|
|
|
|
I'm gonna try this again tomorrow.. I've had enough for today.. I will continue the long thread tomorrow lol...
Thanks again ya akhy..
|
|
|
|
|
|
Actually what i am doing is from IE i am accessing my web site running on asp.net platform. In the datagrid i have given the link. Whwn i click the link
i logon the FTP server and make the socket connection from where i have to start downloading the file.
When i try to acces the IP of the client machine like \\192.168.1.82\c$\abc.iso for downloading the abc.iso file to the client machine, then
i get the error "Logon Failure : Unknown username or bad password"
SAMPLE CODE
***************************************************************
Public Sub DownloadFile(ByVal sFileName As String, _
ByVal sLocalFileName As String, _
ByVal bResume As Boolean)
Dim st As Stream
Dim output As FileStream
Dim cSocket As Socket
Dim offset, npos As Long
'sLocalFileName = "C:\Inetpub\wwwroot\WebDelivery\Downloadfiles\" & sLocalFileName & ".iso"
If (Not (m_bLoggedIn)) Then
Login()
End If
SetBinaryMode(True)
If (sLocalFileName.Equals("")) Then
sLocalFileName = sFileName
End If
If (Not (File.Exists(sLocalFileName))) Then
st = File.Create(sLocalFileName)
st.Close()
End If
output = New FileStream(sLocalFileName, FileMode.Open)
cSocket = CreateDataSocket()
offset = 0
If (bResume) Then
offset = output.Length
If (offset > 0) Then
SendCommand("REST " & offset)
If (m_iRetValue <> 350) Then
'throw new IOException(reply.Substring(4));
'Some servers may not support resuming.
offset = 0
End If
End If
If (offset > 0) Then
npos = output.Seek(offset, SeekOrigin.Begin)
End If
End If
SendCommand("RETR " & sFileName)
If (Not (m_iRetValue = 150 Or m_iRetValue = 125)) Then
MessageString = m_sReply
Throw New IOException(m_sReply.Substring(4))
End If
Do While (True)
m_aBuffer.Clear(m_aBuffer, 0, m_aBuffer.Length)
m_iBytes = cSocket.Receive(m_aBuffer, m_aBuffer.Length, 0)
output.Write(m_aBuffer, 0, m_iBytes)
If (m_iBytes <= 0) Then
Exit Do
End If
Loop
output.Close()
If (cSocket.Connected) Then
cSocket.Close()
End If
ReadReply()
If (Not (m_iRetValue = 226 Or m_iRetValue = 250)) Then
MessageString = m_sReply
Throw New IOException(m_sReply.Substring(4))
End If
End Sub
***************************************************************
Please help as i am struck on this from last 10 days
please help !!!!!!
thanks
Raju sharma
|
|
|
|
|
Greetings people,
First off, you guys will have to excuse me in case my problem is a simple one. Im not a programmer after all.
Anyway, my problem is very simple: Im trying to display the results of my query in a grid on a webpage and I need to be able to do two things:
1.I want to render the first column fixed such that it remains visible whenever the user scrolls from left to right.
2.I want to be able to print the grid such that each page has the column headers and the corresponding row headers( the fixed column that I talked about in my first point above).
I have searched the internet for a web control that can allow me to do this but so far nothing.
Any ideas on how I can achieve this? Any help will be greatly appreciated.
Kind regards,
Pete.
|
|
|
|
|
Hi,
I want to give Exam 70-528: Microsoft® .NET Framework 2.0 Web-Based Client Development so I need help from you, please tell me how to prepare for this exam.
also please let me know if any one has study material/books for this exam.
Thanks in advance
Thanks & Regards
Girish Pendse
|
|
|
|