Click here to Skip to main content
15,888,984 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Web Task Scheduler Pin
Richard MacCutchan22-Feb-13 23:23
mveRichard MacCutchan22-Feb-13 23:23 
GeneralRe: Web Task Scheduler Pin
Mohammad Hussein Fakhravari23-Feb-13 0:21
Mohammad Hussein Fakhravari23-Feb-13 0:21 
GeneralRe: Web Task Scheduler Pin
Richard MacCutchan23-Feb-13 0:35
mveRichard MacCutchan23-Feb-13 0:35 
GeneralRe: Web Task Scheduler Pin
Mohammad Hussein Fakhravari24-Feb-13 1:01
Mohammad Hussein Fakhravari24-Feb-13 1:01 
GeneralRe: Web Task Scheduler Pin
Richard MacCutchan24-Feb-13 1:10
mveRichard MacCutchan24-Feb-13 1:10 
GeneralRe: Web Task Scheduler Pin
Mohammad Hussein Fakhravari24-Feb-13 20:17
Mohammad Hussein Fakhravari24-Feb-13 20:17 
GeneralRe: Web Task Scheduler Pin
Richard MacCutchan25-Feb-13 0:10
mveRichard MacCutchan25-Feb-13 0:10 
Questiongridview Pin
Member 870181322-Feb-13 7:34
Member 870181322-Feb-13 7:34 
i wrote below code for gridview columns
XML
<Columns>
  <asp:TemplateField HeaderText="S.No">
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                            <ItemTemplate>

                                <asp:Label ID="Lblslno" Visible="false" runat="server" Text='<%#Eval("RequestId")%>' />
                                <%#Container.DataItemIndex+1 %>
                            </ItemTemplate>

                        </asp:TemplateField>
<asp:BoundField DataField="RequestId" HeaderText="RequestId"
        ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Left"
        SortExpression="RequestId" >
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    </asp:BoundField>
<asp:BoundField DataField="ApplicationId" HeaderText="ApplicationId"
        ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Left"
        SortExpression="ApplicationId" >
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    </asp:BoundField>
<asp:BoundField DataField="Document1location" HeaderText="Document1 Location"
        ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Left"
        SortExpression="Document1location" >
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    </asp:BoundField>
<asp:BoundField DataField="Document2location" HeaderText="Document2 Location"
        ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Left"
        SortExpression="Document2location" >
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    </asp:BoundField>
<asp:BoundField DataField="Document3location" HeaderText="Document3 Location"
        ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Left"
        SortExpression="Document3location" >
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
    </asp:BoundField>
  <asp:BoundField DataField="descr" HeaderText="Description" ItemStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Left" SortExpression="descr"  />
  <asp:TemplateField ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Top">
           <HeaderTemplate>Action</HeaderTemplate>
           <HeaderStyle  />
           <ItemTemplate>
              <asp:LinkButton ID="lnkverify"  runat="server" Text="Verify" CommandName="Application_verify"  CommandArgument='<%#Eval("RequestId") %>' />&nbsp;&nbsp;&nbsp;&nbsp;
              <asp:LinkButton ID="lnkreject"  runat="server"  Text="Reject" CommandName="Appication_reject" CommandArgument='<%#Eval("RequestId") %>' />
           </ItemTemplate>
        </asp:TemplateField>
</Columns>

C#
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
       {
           try
           {
               if (e.CommandName == "Application_verify")
               {
                   int projectid = Convert.ToInt32(e.CommandArgument);
                   Response.Redirect("~/details.aspx?RequestId=" + RequestId);
               }

}
catch (ApplicationException ex)
{
lblsuccess.Visible = true;
lblsuccess.Text = ex.Message;
}
catch (Exception ex)
{
StackTrace st = new StackTrace(new StackFrame(true));
StackFrame sf = st.GetFrame(0);

int line = sf.GetFileLineNumber() - 1;
if (ex.Message.StartsWith("Thread") == false) { Response.Redirect("~/HandleError.aspx?ID=" + ex.Message, false); }
}
}
can anyone tell me why i am getting "RequestId" doesn't exist in the current context on response.redirect(~/details.aspx?RequestId=" + RequestId);pls help me
i got solution


modified 22-Feb-13 13:43pm.

Questiondelete a table data&structure Pin
Member 870181322-Feb-13 3:25
Member 870181322-Feb-13 3:25 
QuestionRe: delete a table data&structure Pin
Richard MacCutchan22-Feb-13 4:01
mveRichard MacCutchan22-Feb-13 4:01 
AnswerRe: delete a table data&structure Pin
Member 870181322-Feb-13 4:30
Member 870181322-Feb-13 4:30 
GeneralRe: delete a table data&structure Pin
Richard MacCutchan22-Feb-13 4:45
mveRichard MacCutchan22-Feb-13 4:45 
GeneralRe: delete a table data&structure Pin
Member 870181322-Feb-13 5:53
Member 870181322-Feb-13 5:53 
GeneralRe: delete a table data&structure Pin
Richard MacCutchan22-Feb-13 6:07
mveRichard MacCutchan22-Feb-13 6:07 
AnswerDROP TABLE Pin
David Mujica22-Feb-13 4:20
David Mujica22-Feb-13 4:20 
GeneralRe: DROP TABLE Pin
Member 870181322-Feb-13 4:31
Member 870181322-Feb-13 4:31 
QuestionMVC and Web.config(ssssss)???!!!!!?? Pin
Super Lloyd21-Feb-13 14:14
Super Lloyd21-Feb-13 14:14 
AnswerRe: MVC and Web.config(ssssss)???!!!!!?? Pin
Sandeep Mewara21-Feb-13 19:06
mveSandeep Mewara21-Feb-13 19:06 
GeneralRe: MVC and Web.config(ssssss)???!!!!!?? Pin
Super Lloyd21-Feb-13 21:49
Super Lloyd21-Feb-13 21:49 
GeneralRe: MVC and Web.config(ssssss)???!!!!!?? Pin
Sandeep Mewara21-Feb-13 22:09
mveSandeep Mewara21-Feb-13 22:09 
QuestionHandling application settings in Virtual path provider Pin
Mark hafel21-Feb-13 13:33
Mark hafel21-Feb-13 13:33 
Questionasp.net app with c#, vb, and fortran Pin
ryan johnson21-Feb-13 12:53
ryan johnson21-Feb-13 12:53 
AnswerRe: asp.net app with c#, vb, and fortran Pin
Richard Deeming22-Feb-13 1:54
mveRichard Deeming22-Feb-13 1:54 
QuestionDynamically update price based on exchange rate Pin
Deepa420-Feb-13 20:06
Deepa420-Feb-13 20:06 
AnswerRe: Dynamically update price based on exchange rate Pin
Sandeep Mewara20-Feb-13 21:49
mveSandeep Mewara20-Feb-13 21:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.