|
toprogramminguy wrote: Am i using the viewstate wrong?
page_load executes first before executing the button click handler. So first time ViewState["currentcomics"] will have NULL value. So do a NULL check before you access the value. Something like..
else currentComics = ViewState["currentcomics"] == null ? 6 : (int)ViewState["currentcomics"];
|
|
|
|
|
Ya i have done that now, but it wasnt on the first run that the exception was thrown because it wouldnt have been a postback , it was when I clicked the next button which has me all confused again
does the accessDatatables(); get called when i call it in the buttonclick event handler or when the updatepanel is reloaded?
|
|
|
|
|
toprogramminguy wrote: but it wasnt on the first run that the exception was thrown
Yes. It will be thrown when you clock the next button for the first time. Your else portion will get executed, but since ViewState is not created for the key you are accessing, it will return NULL.
toprogramminguy wrote: does the accessDatatables(); get called when i call it in the buttonclick event handler or when the updatepanel is reloaded?
I am not getting what you mean here. It will be called when the next button is clicked.
|
|
|
|
|
Ok. Now the button is incrementing the currentcomic value but when the updatecontrol reloads nothing is displayed event though the updateprogress is showing so I know something is happening.
Thanks for your help.
I'll figure out the rest of it myself...hopefully
|
|
|
|
|
Hi, thanks for looking, i had posted this link in the testing forum, but that forum is kind of "lonely"
I made a web app: PideEnLinea.com[^]
Im not sure how secure it is, i did follow some security guidelines, but who knows
Also i made some load tests
If someone has a chance, please visit it and try to make some sql injections, XSS or try to hack it
If you do hack it or make sql injections or XSS, please let me know by replying here :P
Thanks in advance for any feedback
Alexei Rodriguez
|
|
|
|
|
Dear all
i have a page included ajax timer
and textbxo while i focus and write in textbox i lose the focue when the time ticke work
and i should set the textbox focus to continue writting and i lose it again when the timer work
i need help for this i want finish writting in textbox while the timer working
thanks for help
MD_NADA
|
|
|
|
|
Hard to comment without seeing code, but I would suspect that you perhaps want to reset your timer while the textbox has focus ? What does the timer do ? It sounds like it moves the focus to some other control.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
i am sorry i didn't descrip my case well
but my homepage has many usercontrol
some of these controls included ajax timer and in my home page i have 1 control for search and one control
for login
if i write in search textbox it is easy until the timer ticker work
i lose the focus of textbox and i cant continue write in textbox and the samler to login textbox
i hope i descrip it well
MD_NADA
|
|
|
|
|
Still you haven't answered the question - What does timer do? Is it setting focus to some other control?
|
|
|
|
|
the timer used for displaying the news i change the news title and news image in the timer ticke
so when the news change i lose the focus of textbox
MD_NADA
|
|
|
|
|
Hi, guys. Can any one help me to build a forum site in asp.net.
I want to build it from scratch.
|
|
|
|
|
Mohammad Rakibul Hasan wrote: Hi, guys. Can any one help me to build a forum site in asp.net.
I want to build it from scratch.
Collect requirmetns, Prepared Design Doc, Techincal Desing, Start Development.. if stuck ask CP, Test the application, Deploy on server... Release it.
Just kidding,
Look Here
|
|
|
|
|
Well, if that's all you know about how to do it, then you should start by reading an ASP.NET book. This site works best when people do some work themselves, then ask specific questions as they get stuck.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
how to add tamil or hindi font
into asp net
using resource file
|
|
|
|
|
|
www.spiritssoft.com
www.kamadhenucollege.com
Spirits Soft Technologies
www.spiritssoft.com
|
|
|
|
|
Hey..
i addeed classlibrary to my my project..in class library i am adding some methods..i added all assemblys by addreference in the classlibrary..
The type or namespace name 'exception' could not be found (are you missing a using directive or an assembly reference?)
what assembly i should add?
modified on Thursday, June 11, 2009 2:07 PM
|
|
|
|
|
What you did?
You have create a class library. Build that library. From another project Add that dll as Reference. Now you want to use it?
Did you add using exception ?
|
|
|
|
|
No i din't added using exception..
How to do that ?? i din't get add using exception?
Could You Expalin me in Detail..
|
|
|
|
|
what is the namespace name of your class library?
|
|
|
|
|
Hi,
I need to import data from a CSV file to an SQL table i have used tohe following in the past to import an excel file but wondered if/how i can adapt it to import from a CSV.
Also, it would be a great help if you could show me how to convert it to use column mapping.
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\qs_upload.xls;Extended Properties=""Excel 8.0;HDR=YES;""";
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
{
OleDbCommand command = new OleDbCommand("Select * FROM [quality_standard$]", connection);
connection.Open();
using (OleDbDataReader dr = command.ExecuteReader())
{
string sqlConnectionString = "Data Source=wibblewobble.com;Initial Catalog=comfound;Persist Security Info=True;User ID=##########;Password=##########";
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "tbl_QualityStandard";
bulkCopy.WriteToServer(dr);
}
}
}
Thanks!
|
|
|
|
|
Hi,
I want to read an xls file and import data in dataset. This xls file is a system generated tab delimited file. Using below code I am getting "External table is not in the expected format" exception.
If I open the same file in excel and save it in correct excel format this piece of code works fine.
public static void ReadExcelFileData()
{
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\Test.xls;Extended
Properties='Excel 8.0;HDR=Yes;IMEX=1;FMT=TabDelimiter'";
// Establish Connection
_connExcel = new OleDbConnection(connectionString);
_cmdExcel = new OleDbCommand();
_cmdExcel.Connection = _connExcel;
try
{
//Accessing Excel Sheet
_connExcel.Open();
//Code to read excel file
}
catch (Exception ex)
{
throw ex;
}
}
}
}
}
I tried to modify the connectionstring as given below,But it also gave me "c:\Test.xls is not a valid path" error
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\Test.xls;Extended
Properties='text;HDR=Yes;IMEX=1;FMT=TabDelimiter'";
If anybody had faced such problem earlier, Please let me know the solution implemented by you.
Thanks & Regards,
Deepak
|
|
|
|
|
A tab delimited file is NOT an excel spreadsheet, whatever you use for an file extension, so it will be in the wrong format. You can read it in many ways, its just a series of fields delimited by a tab.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hello
is there such thing as 32bit or 64bit Visual Studio? I know there're two version of ASP.NET - 32bit and 64 bit. But are there two versions of VS?
Alternatively, is there ... a build or compile option that lets you decide whether you intend to build targeted 32 bit or 64 bit ASP.NET?
Thanks
dev
|
|
|
|
|
devvvy wrote: a build or compile option that lets you decide whether you intend to build targeted 32 bit or 64 bit ASP.NET?
like this[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|