|
Hi,
I am using System.Web.HttpContext.Current.Session at my cs file for accessing Session variables like:
1. String CustomerID="0";<br />
2. if(System.Web.HttpContext.Current.Session["CustID"]!=null)<br />
3. { <br />
4. CustomerID=<br />
5. System.Web.HttpContext.Current.Session["CustID"].ToString();<br />
6. }<br />
<br /> 7. //////////
It give an object reference not set to an instatnce of an object- error at line number 2.
I have allready assigned the Session["CustID"] at another page.
N a r e s h P a t e l
|
|
|
|
|
|
How to connect the sql server 2005 database to vb.net 2005 please provide the code.
|
|
|
|
|
If you have no idea how to do this, you either have not read your book, or you have not bought one. Either way, the process is too complex to answer in a forum post. Buy a book, read an article, come back if you've tried to do it, and have a *specific* question. That's where these forums are better than google, not top level 'I have no idea where to start because I haven't looked' questions.
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 )
|
|
|
|
|
Dim Con As New SqlConnection
Con = New SqlConnection("Data Source=server; Initial catalog=TEST;Integrated security=true;")
Sathya
|
|
|
|
|
Now, you know he's going to try this verbatim and come back to say it didn't work, right ?
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 )
|
|
|
|
|
Or I'll get a bunch of 1 votes from retards, and he'll do what so many people do, ask vague questions and ignore all the people who try to help them further.
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 )
|
|
|
|
|
if i assign in login page what happen, how to check after login user verified or not which condition i need to check
Request.IsAuthenticated is always showing true,
when it will be true and when it will false,
for setting Request.IsAuthenticated =true what we need to do
This is haneef.............................................................
|
|
|
|
|
|
i try this code but this not worked properly.
Button but = new Button();
but.Text = "Full Detail";
but.ID = "Full_Detail";
t.OnClientClick += new System.EventHandler(fullDetail);
Panel1.Controls.Add(but);
private void fullDetail(object sender, EventArgs e)
{
SearchResult.InnerHtml = "Hi";
}
|
|
|
|
|
Your click event will not fire unless the button is added before the page load event.
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 )
|
|
|
|
|
when did you add the button.
check this, itw working fine
protected void Page_Load(object sender, EventArgs e)
{
Button b = new Button();
b.Text = "Dunamic";
b.ID = "myid";
b.Click += new EventHandler(b_Click);
Panel1.Controls.Add(b);
}
void b_Click(object sender, EventArgs e)
{
Response.Write("Dynamic Button");
}
|
|
|
|
|
thank
this code button load in page_load
but i have a button. then click on button i want to create a new button
and then i click on new button than show message "Hi";
|
|
|
|
|
prakash_adysoft wrote: this code button load in page_load
yes
prakash_adysoft wrote: have a button. then click on button i want to create a new button
as Chirs say, you have register event before page load.
|
|
|
|
|
I think its better to creat to do this functionality in Page_init rather than Page Load
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
Hello!
I have a problem IIS not Support to .Net FrameWork directly. How can i code in ASP.Net2005 with IIS of Xampp(Aachi Server).
Regard
Sohail
|
|
|
|
|
Sohial A Rana wrote: I have a problem IIS not Support to .Net FrameWork directly
what does it mean ? how did you know that ?
|
|
|
|
|
Sohial A Rana wrote: How can i code in ASP.Net2005 with IIS of Xampp(Aachi Server).
I don't know that you can. IIS is your best option.
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 have created a dsn for sql server database. Now how do I code to open my database table to retrieve and save records in my table? Reply fast.
|
|
|
|
|
SSN wrote: I have created a dsn for sql server database
Why your are creating DSN for SQL Server ?
SSN wrote: Now how do I code to open my database table to retrieve and save records in my table? Reply fast.
Serach Google . Just learn Basic of ADO.NET
|
|
|
|
|
please tell me how code asp.net with vb using DSN of sql server 2005
|
|
|
|
|
Google is not working there ??
|
|
|
|
|
please tell me the sample code of connecting sql server database to my asp.net web application using vb
please..... reply fast...........
|
|
|
|
|
SSN wrote: tell me the sample code of connecting sql server database to my asp.net web application
While asking this type of Question , please Search google First. this is very simple and basic Question.
Any way Try This link
Ado.net + VB.NET Code[^]
SSN wrote: reply fast...........
You are not paying us. so dont post like that .
Good luck
|
|
|
|