|
DarynRoberts wrote: Im trying to create a very simple forum where people can basically just post comments.
If you need a very simple application where user's can post comments, why don't you create one instead of looking for tutorials.
1 - Which language you are familiar to ?
2 - Which database you are familiar to ?
If it is VB.NET and SQLServer
1 - You need to use SQLConnection. SQLCommand classes
2 - You need a connection string that connects with DB
3 - For inserting into database, Initialize SQLConnection class, Write query to SQlCommand class instance, Use SQLCommand's ExecuteNonQuery() method
4 - For selection either you can use SQLDatareader or a Dataset/Datatabel
|
|
|
|
|
Hey Thanks!!....smart-ass
Dazz
|
|
|
|
|
Hi,
I'm currently developing a web app which has a number of different roles and forms. I've got a javascript dropdown menu that I'm displaying on each page and depending on role and current form want to show different items. As it stands I'm using a StringBuilder in the Page_Load function to build the script and then add it to a Label:
<br />
if (Page.User.IsInRole("Admin"))<br />
{<br />
menuBuilder.Append("tmenu1.addItem(\"Add New User\", \"Admin/AddUser.aspx\"); ");<br />
menuBuilder.Append("tmenu1.addItem(\"View Admin Tasks\", \"Admin/AdminMaintenance.aspx\");");<br />
...<br />
}<br />
lblMenu.Text = menuBuilder.ToString();<br />
but when I come to view the page the page doesn't appear to load the script. I've checked the page source and the script is definitely in the page and is syntactically the same as I've got it on working pages...
Can anyone shed any light on why this hasn't worked - I'm only assuming it's possible to render script through the Label control into the page??
Cheers
Dave
|
|
|
|
|
Did you try RegisterStartupScript or one of the similar Script Emitters?
|
|
|
|
|
I've actually just tried to emit it straight in an 'inline' kind of fashion - is it not possible to do this?
I'll have a good for RegisterStartupScript and see what I can find.
Cheers
Dave
|
|
|
|
|
moon_stick wrote: is it not possible to do this?
Yes it is, but remember the <script> tags!
You're still better off to use the accepted method of emiting javascript.
|
|
|
|
|
Hi,
Friends i need your help.In my new project i am using NHibernate...the problem is that..
after displayed some details in grid i want to sort the grid using each heading of the grid.
here i am using asp.net c# and NHibernate criteria.
please any body help me...
Thanks in advance.
alex.
|
|
|
|
|
Hi all...
I have one gridview on one aspx page with a button on the page. on click of button i want to open one new pdf file window with option open or save. this pdf file should contain my gridview data.
i am not using crystal report as it is not required in my project, this i am referring just for reference as some people suggest to use crystal reports for getting this solution, but i can't use crystal reports here.
please help me out to get this without using any third party / freeware (tool or library). i have to solve it without third party tool etc as customer is stick to not use any extra tool or library.
means how we can do it by code in C# and asp.net 2.0.
if anyone knows please help me as it is required for my current project and is very urgent.
Akhilesh Singh
|
|
|
|
|
incase if u can modify these exisitng codes
take a look
http://www.codeproject.com/cs/library/giospdfnetlibrary.asp
winnie
|
|
|
|
|
Thanks winnie. i am trying with this but till now not got it working, once it works normaly, then i will try to change it based on my needs.
presently it's throwing lots of error, so i need to correct those errors. hope soon it should work.
People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
|
|
|
|
|
Did you get it work ?? i am trying the same thing..
suchita
|
|
|
|
|
hello
java script have the isdate() function ?.
Mohan t working for N.I.C
|
|
|
|
|
there are numerous custom built functions...
i got these from other forums, try it out
*****************************************************
function isDate(dtStr){
var daysInMonth = DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strMonth=dtStr.substring(0,pos1)
var strDay=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
for (var i = 1; i <= 3; i++) {
if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if (pos1==-1 || pos2==-1){
alert("The date format should be : mm/dd/yyyy")
return false
}
if (strMonth.length<1 || month<1 || month>12){
alert("Please enter a valid month")
return false
}
if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
alert("Please enter a valid day")
return false
}
if (strYear.length != 4 || year==0 || year<minyear ||="" year="">maxYear){
alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
return false
}
if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
alert("Please enter a valid date")
return false
}
return true
}
**************************************************
regards
winnie
|
|
|
|
|
thank u.but its a custom function.there is any inbuild function
Mohan t working for N.I.C
|
|
|
|
|
in vbscript the isDate built function is there, but in JS have no idea bout that....
winnie
|
|
|
|
|
yes exactly.u r correct java script doesn't hav that function.thank u
Mohan t working for N.I.C
|
|
|
|
|
|
hi
in javascript.isdate() function
Mohan t working for N.I.C
|
|
|
|
|
How iam using GMDatePicker for entering the
date time .now my problem is
if i selct that as null its sotored in to data base
as 01-01-1900 instead of that ineed to
store
null value how can i do that
Kiran Kumar.P
|
|
|
|
|
I don't think even you assign Null to a DateTime variable since it will elicit a compile time error. Thatz why perhaps, we have a DateTime.MinValue in existence.
|
|
|
|
|
Hai
how can i insert null
if user is not insert any
value that is myquestion
Kiran Kumar.P
|
|
|
|
|
U can't insert NULL For Datetime datatype.
Check out if Date is "01-01-1900" then display "" Instead of "01-01-1900"
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
NULL is not an allowed value for DateTime. Your best bet is the predefined constant DateTime.MinValue .
|
|
|
|
|
hi please help me i have designed a form in asp.net with sqlserver.
<asp:dropdownlist id="ddcountry" style="Z-INDEX: 104; LEFT: 320px; POSITION: absolute; TOP: 232px"
="" runat="server" width="160px">
<asp:listitem>India
<asp:listitem>US
<asp:listitem>UK
<asp:listitem>Canada
SqlConnection con=new SqlConnection("database=anand;server=sdiserver;uid=sa;pwd=sa");
con.Open();
SqlCommand cmd=new SqlCommand("Insert into jai(name,age,gender,conntry)values('"+Txtname.Text+"','"+Txtage.Text+"','"+txtgender.Text+"','"+coun+"'",con);
cmd.ExecuteNonQuery();
con.Close();
i am getting this error
Incorrect syntax near 'India'
please help me
jai prakash
|
|
|
|
|
Missing to enclose query ")" after coun
Best Regard
Pathan
-- modified at 5:30 Friday 24th August, 2007
---------------------------------------------------
|
|
|
|