|
|
hi guys i am curious about how to select particular data from an database and store into an variables example(from sql database)
i have 1 table named index wit the fields name, number
the table data would go like this
name number
a 2
b 3
c 1
how can i do an sql select statement to store the 3rd field(name = c) number field into an int variable?
|
|
|
|
|
declare @number int
select @number = number from table where name = 'c'
select @number
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
if i wanna place it in my page load in the coding section how would i code it then?
int number;<br />
<br />
Select CurrentNo FROM LookUpID;
like this?
|
|
|
|
|
1)You can use stored procdure and have a output variable and after executing the stored procedure, the output parameter value could be assigned to any of your variable
2)If only one value is required you can use ExecuteScalar method and the result of the method could be assigned to a variable accordingly.
Gautham
|
|
|
|
|
what is stored procedure???
what is execute scalar??
can it be only done in the c# coding side of the website? or even at the html coding side?
also..
does anyone have a web site that teaches how to abstract the data by coding so far only done abstrating of data and storing into datagrid
no idea wat kind of code to use for single data >.<
|
|
|
|
|
Hi
I am getting a javascript error when i am trying to submit an asp page.
For this i used the following javascript code.
function fnRefresh()
{
document.forms("__aspnetForm").submit();
}
And used the following VB.Net code to call this.
Me.RegisterStartupScript("postback", "<script lang='javascript'> fnRefresh(); </script>")
This will submit the page. But before submitting, the explorer will show an yellow color warning left bottom of the explorer and before i am clicking on it to read it will change to done.
I am using internet explorer 6
Gg
|
|
|
|
|
Click that yellow tab show that is displays the error! Post the error again
Gautham
|
|
|
|
|
Hi
Thank you for your response.
I solved that problem by setting the Smart navigate property to false.
Gg
|
|
|
|
|
Hi,
I need to create and run an existing asp.net web project using vs.net (2003).
When I try to create or open an existing project, the following error message appears:
The web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'.
I've tried many possible solutions available on the internet including re-install windows followed by vs.net.
But they don't help.
If anyone has experienced this before, please help.
My configuration:
- Windows Server 2003 SP2
- Visual Studio 2003
- ASP.NET v1.1.4322
Thank you very much.
KiT
Never wait for a chance to come, Believe in your own potential and go get it!
|
|
|
|
|
how to type hindi fonts in eg:webform1.hi-IN.resx file,iam unable to type hindi font in resource file.. what to do inorder to type hindi in resource file...
Plz Help me....
|
|
|
|
|
type it somewhere then copy and paste it in resource file.
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
i tried my dear friend but its not working
|
|
|
|
|
need help in crystal report.....,
take sample like this....,
In table i have collections of students marks based on studentid....,
i displayed based on the studentid his grandtotal and some other calculations in my form,
Now what are the output i am getting in my form,those things i want to display in crystal report also...,
how to pass thos evalues to my crystal report.....
plz help me...
Magi
|
|
|
|
|
search crystalreport push method in code project. you will get solution
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
I have a Webform Containing Two Radio buttons with GroupName and a Grid Containing Check boxes.If I select Header Check Box in the Grid Radio Buton2
is also Checked.If I Uncheck the Header Check Box then both the Radio Buttons are Unchecked.
I Used following Java Script code to Check Checkboxes in the Grid.
function select_deselectAll (chkVal, idVal)
{
var frm=document.forms[0];
for (i=0; i< (frm.length); i++) {
if (idVal.indexOf ('SelectAll') != -1)
{
if(chkVal == true)
{
frm.elements[i].checked = true;
}
else
{
frm.elements[i].checked = false;
}
}
else if (idVal.indexOf ('SelectOne') != -1)
{
if(frm.elements[i].checked == false)
{
frm.elements[1].checked = false;
}
}
}
if There are no Radio buttons it is working fine .I cannot find the solution.
Please anybody help me.
Regards
Narendra Mohan
|
|
|
|
|
here u are not checking whether the element is radio or checkbox.
so u have to check that...
if (frm.elements[i].type == "checkbox")
frm.elements[1].checked = false;
Thanks,
Sun Rays
|
|
|
|
|
Dear Sir,
Thank you Very much for your valuable reply
Thanks and regards
Narendra Mohan
|
|
|
|
|
hi all,
Iam new to ajax, I want sample code for scenario like this.
i have to dropdown controls,
first is populate with contries, if i select a contry in first dropdown i need to populate related states of particuler contry,
pls help me
\
thanks N Advance,
|
|
|
|
|
Have you had a look at www.asp.net there are good videos and ajax toolkit samples.
|
|
|
|
|
Hi am using DetailsView and ObjectDataSource to insert records in database.
detailsview contains dropdown,texbox and Listbox controls.. I selected multiple items from Listbox and now if I click on Insert button multiple records has to be inserted in database. Is this possible...? can u send me the code how can I approach? am using asp.net 2.0 and C3
|
|
|
|
|
here u are not checking whether the element is radio or checkbox.
so u have to check that...
if (frm.elements[i].type == "checkbox")
frm.elements[1].checked = false;
Thanks,
Sun Rays
|
|
|
|
|
Very Thank full for your help
Thank Thank Thank
Sunil Tvl
|
|
|
|
|
I'm curious. Why did you delete the original question?
|
|
|
|
|
Respected Gurus
How to get the value of a hidden server control on client side.
I mean i have a
control.
I m setting its value on the page_load event of my web page.
I want its value in one of my javascript function.
How to do that.
My code is
function SetInitialFocus()
{
var chk=document.forms[0].getElementById('ChkNewEdit').value;
if (chk="new")
document.forms[0].getElementById('txtName').focus();
else
document.forms[0].getElementById('txtContactPerson').focus();
}
<asp:textbox id="txtName" runat="server">
<asp:textbox id="txtContactPerson" runat="server">
Server side code is:---------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
if some condition then
ChkNewEdit.value="Edit"
else
ChkNewEdit.value="New"
end sub
Thanx in advance...
|
|
|
|