|
|
Abdulhafeezo wrote: ecause i am intending using tab control for the whole of my web site
You can use AJAX Tab Panel !
|
|
|
|
|
will u like to help me in building my website www.runningcodes.net
|
|
|
|
|
what kind of help you are expecting from me?
|
|
|
|
|
i will like u to help me make it possible for a forum to be on the site. can u help?
|
|
|
|
|
Abdulhafeezo wrote: i will like u to help me make it possible for a forum to be on the site. can u help?
Please let us know what is your actual problem.
|
|
|
|
|
Hi , ive got a asp.net vb web app, now i save a color code the a sql database and the show the data in a c1webgrid, now what i want to do is put a panel in template column and set the backcolor of the panel acording to what is in the database
Now what i did was
<C1WebGrid:C1TemplateColumn>
<ItemTemplate>
<asp:Panel ID="Panel4" runat="server"
BackColor='<%# Eval("ColorCode") %>' Height="20px" Width="20px>
<asp:Panel>
</ItemTemplate>
</C1WebGrid:C1TemplateColumn>
but it gives me a System.InvalidCastException: Specified cast is not valid error
if someone can please help me with this,
Thanks
|
|
|
|
|
Try Eval("ColorCode").ToString()?
|
|
|
|
|
got it right,
i put , <%# System.Drawing.ColorTranslator.FromHtml(Eval("ColorCode")) %>
thanks anyway.
|
|
|
|
|
Hi All,
I have two registration form. On filling the first form, a session is created and the user is redirected to the second page. But on second page session becomes null.
I have debug the code and session is successfully created on first page but when redirected to second page session automatically becomes null.
Why this is happening?
Here is the code :
Page1.aspx.cs :
---------------
protected void btnSaveNext_Click(object sender, ImageClickEventArgs e)
{
try{
Session["RowId"] =rowID;
Response.Redirect("Page2.aspx", false);
}
catch{}
}
Page2.aspx.cs :
---------------
protected void Page_Load(object sender, EventArgs e)
{
if (Session["RowId"] == null )
{
Response.Redirect("login.aspx", false);
}
}
Thanks,
|
|
|
|
|
A simple google search(like this[^]) would have helped you.
Anyway, this [^]is the exact explanation to your problem.
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.
|
|
|
|
|
Hi,
Thanks for this valuable link.But if you see my code i am using the overloaded redirect method.
Please check my code.
Thanks
|
|
|
|
|
I don't suppose you're abandoning the session in the Page_Load event on page 1 (or anywhere else on page 1 for that matter)?
|
|
|
|
|
Server.Transfer() will work.
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
I have used server.transfer it works fine but what could be problem with response.redirect(). I am using response.redirect on many pages.
Sometime back response.redirect was working fine. What could be the problem?
|
|
|
|
|
I have a page where i have some client side validations on a button click and also some serverside event. I am using a asp button. I know its doing some server events so postback will occur but is there anyway i can stop that postback? Or do i have to use update panel of ajax only..But I prefer not to use this since it postsback but doesnt show its postbacking!! Please do help
|
|
|
|
|
If you want to have some server side code which should be executed than it will definitely do a Postback.
In this case, you should make use of AJAX.
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.
|
|
|
|
|
user UpdatePanel to avoid that
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
If you want to stop a postback, return 'false' on the client side event. Of course, if you stop postback, then your server side code won't run. If you want the server side code to run without any sort of postback, not even AJAX, then you are seriously deluded and need to give up until you've read some basic books, that would make your question retarded. If you want to stop the server side code from running based on a condition in the client side code, just return false to stop the postback.
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
|
|
|
|
|
hi
in javascript validation function
write return false
so it stops the page excution
|
|
|
|
|
I am using this code to find the value of dynamically created controls
Dim cmd2 As String = ("Select Specification from DefineSpecification where CategoryID=" + id.ToString())
Dim rdr2 As IDataReader = db.ExecuteReader(CommandType.Text, cmd2)
Dim conn As New SqlConnection
Dim cmd As New SqlCommand("Select Count(*) from DefineSpecification Where CategoryID=" + id.ToString(), conn)
conn.ConnectionString = ConfigurationManager.ConnectionStrings("See2Buy").ConnectionString
conn.Open()
Dim count As Int32 = Convert.ToInt32(cmd.ExecuteScalar())
While rdr2.Read
Dim lbl = New Label()
lbl.Width = "140"
lbl.Text = rdr2.Item("Specification")
For counter2 As Integer = 0 To count - count
Dim txtbox As TextBox = DirectCast(Panel4.FindControl("TextBoxID1"), TextBox)
Dim cmd3 As String = "Insert into Specification(CategoryID,ProductName,SpecificationHeading,SpecificationDescription)Values(" & id & ",'" + txtProductName.Text + "','" + lbl.Text + "','" + txtbox.Text + "')"
Dim dbcmd3 As DbCommand = db.GetSqlStringCommand(cmd3)
db.ExecuteNonQuery(dbcmd3)
Next
End While
The error is :Object reference not set to an instance of an object.
|
|
|
|
|
KhandelwalA wrote: Object reference not set to an instance of an object.
The meaning of this error is that an object which you are using is not initialized i.e. it is NULL(Nothing is VB.Net).
Most likely, it looks to me that rdr2 might me NULL in some cases.
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.
|
|
|
|
|
Because your code sucks. In SO many ways, but in this instance, because it grabs all sorts of items and doesn't ever check for success before using them
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
|
|
|
|
|
Christian Graus wrote: Because your code sucks
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.
|
|
|
|